Metadata writeback cache support (LU-10938)

[LU-13015] WBC: lfs wbc and lctl wbc utils Created: 26/Nov/19  Updated: 29/Nov/19

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Technical task Priority: Blocker
Reporter: Qian Yingjin Assignee: Qian Yingjin
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Related
is related to LU-10938 Metadata writeback cache support Open
is related to LU-13012 WBC: Rule based auto WBC Open
is related to LU-10938 Metadata writeback cache support Open
Rank (Obsolete): 9223372036854775807

 Description   

lfs wbc commands

# lfs wbc cache $DIR

If $DIR is an empty directory, try to acquire WBC EX lock from MDT for $DIR;
If $DIR is not an empty directory, add hint to the directory $DIR to indicate that:

  • all new creating sub dirs ( not include regular files?) should obtain the EX lock;
  • New sub dirs create on MDT synchronously.
  • New sub dirs are in (P|S) state;

 

# lfs wbc list $MOUNT

List all root WBC directories on a client.

 

# lfs wbc uncache $DIR

Sync and remove a cached root WBC directory $DIR.

 

#lfs wbc state $file

Display the WBC state of the file $file.

lctl wbc commands

LU-13012 WBC: Rule based auto WBC;

 

# lctl wbc /mnt/lustre [--data-on-pcc] [--metadata-on-pcc] [--device /mnt/pcc] [--memfs]...


 Comments   
Comment by Andreas Dilger [ 26/Nov/19 ]

I think it makes sense for the client to always try to get the WBC EX directory lock on a new directory. In the worst case this causes an extra LDLM blocking callback if the directory is immediately contended, but I think the far more common case is that the client creating the directory will also create at least a few files in it (eg. num_threads per client) before it is accessed by other clients. This makes WBC immediately useful for users, and also improves test coverage significantly.

The "lfs wbc cache $DIR" command should force the client to try and get the WBC EX lock on existing directory "$DIR" and fetch the list of filenames via readdir so that it can make local decisions whether the filename exists already or not. Eventually, even the fetching and caching of directory entries should be done automatically based on how many files the one client is creating in the same directory, and if other clients are contending for the directory lock. For WBCv1 we shouldn't try to handle existing directories, only new directories.

Generated at Sat Feb 10 02:57:38 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.