diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:49:57 -0500 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:29 -0500 |
commit | 34286d6662308d82aed891852d04c7c3a2649b16 (patch) | |
tree | c4b7311404d302e7cb94df7a4690298e1059910a /Documentation/filesystems/porting | |
parent | 44a7d7a878c9cbb74f236ea755b25b6b2e26a9a9 (diff) |
fs: rcu-walk aware d_revalidate method
Require filesystems be aware of .d_revalidate being called in rcu-walk
mode (nd->flags & LOOKUP_RCU). For now do a simple push down, returning
-ECHILD from all implementations.
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'Documentation/filesystems/porting')
-rw-r--r-- | Documentation/filesystems/porting | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index ccf0ce7866b9..cd9756a2709d 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -360,3 +360,23 @@ i_dentry to be reinitialized before it is freed, so an: | |||
360 | INIT_LIST_HEAD(&inode->i_dentry); | 360 | INIT_LIST_HEAD(&inode->i_dentry); |
361 | 361 | ||
362 | must be done in the RCU callback. | 362 | must be done in the RCU callback. |
363 | |||
364 | -- | ||
365 | [recommended] | ||
366 | vfs now tries to do path walking in "rcu-walk mode", which avoids | ||
367 | atomic operations and scalability hazards on dentries and inodes (see | ||
368 | Documentation/filesystems/path-walk.txt). d_hash and d_compare changes (above) | ||
369 | are examples of the changes required to support this. For more complex | ||
370 | filesystem callbacks, the vfs drops out of rcu-walk mode before the fs call, so | ||
371 | no changes are required to the filesystem. However, this is costly and loses | ||
372 | the benefits of rcu-walk mode. We will begin to add filesystem callbacks that | ||
373 | are rcu-walk aware, shown below. Filesystems should take advantage of this | ||
374 | where possible. | ||
375 | |||
376 | -- | ||
377 | [mandatory] | ||
378 | d_revalidate is a callback that is made on every path element (if | ||
379 | the filesystem provides it), which requires dropping out of rcu-walk mode. This | ||
380 | may now be called in rcu-walk mode (nd->flags & LOOKUP_RCU). -ECHILD should be | ||
381 | returned if the filesystem cannot handle rcu-walk. See | ||
382 | Documentation/filesystems/vfs.txt for more details. | ||