Metadata writeback cache support
(LU-10938)
|
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Technical task | Priority: | Minor |
| Reporter: | Qian Yingjin | Assignee: | WC Triage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||
| Rank (Obsolete): | 9223372036854775807 | ||||
| Description |
|
In LU-13021, we have designed three flush mode for WBC. In WBC_FLUSH_AGE_LOCK_HOLD flush mode, to optimize the unlink() operation, we can also do unlink via background flush ->write_inode(). The design could be as follows:
|
| Comments |
| Comment by Andreas Dilger [ 04/Dec/19 ] |
|
Another option would be to send one or more MDS_RMFID RPC with the FIDs of the files in the tree, starting at the bottom. One thing to be careful of is that RMFID will delete all links to the file, so we would need a slight modification to allow removing just some links. |
| Comment by Qian Yingjin [ 04/Dec/19 ] |
|
Could MDS_RMFID remove a whole subtree on MDT? For example, when flush a dirty directory /mnt/lustre/wbc/batch: /mnt/lustre/wbc/batch/dir1/a /mnt/lustre/wbc/batch/dir1/b /mnt/lustre/wbc/batch/dir1/c /mnt/lustre/wbc/batch/dir2/a /mnt/lustre/wbc/batch/dir1/dir3/dir4/bb ... /mnt/lustre/wbc/batch/f1 /mnt/lustre/wbc/batch/f3 these files are all removed from client WBC cache, but already flushed to MDT. At this time, it only needs to send unlink requests for its children files or directories: /mnt/lustre/wbc/batch/dir1 /mnt/lustre/wbc/batch/dir2 /mnt/lustre/wbc/batch/f1 /mnt/lustre/wbc/batch/f3
It does not need to start at the bottom for the best of the optimization.
|
| Comment by Andreas Dilger [ 04/Dec/19 ] |
|
The reason I suggest it needs to start at the bottom is that if removing a directory it would be best if the directory is already empty. Otherwise, there is a real danger if RMFID is allowed to remove the whole directory of entries. In general, the ability to remove a whole directory recursively is dangerous and should be restricted as much as possible. |
| Comment by Andreas Dilger [ 04/Dec/19 ] |
|
I think that having a dedicated "rm -r" optimization is a much lower priority than the batched RPCs support in LU-13045. Once we have batched RPCs then we will already be able to unlink files very quickly over the network. It also isn't clear that having the EX lock on an existing directory necessarily means that this client is the only one accessing the subtree. |
| Comment by Gerrit Updater [ 23/Nov/21 ] |
|
"Yingjin Qian <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/45640 |
| Comment by Gerrit Updater [ 23/Nov/21 ] |
|
"Yingjin Qian <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/45642 |
| Comment by Gerrit Updater [ 23/Nov/21 ] |
|
"Yingjin Qian <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/45643 |