Skip to content

Optimize NFS open() calls by means of 'intents'...

Trond Myklebust linux-fsdevel linux-nfs lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Optimize NFS open() calls by means of 'intents'...drivers/net/wan/comx.c fs/adfs/adfs.h fs/adfs/dir.c +62 more+175 -1352 replies
1/4Optimize NFS open() calls by means of 'intents'...fs/affs/namei.c fs/bfs/dir.c fs/cifs/cifsfs.h +38 more+77 -5713 replies
3/4Optimize NFS open() calls by means of 'intents'...drivers/block/floppy.c fs/cifs/cifsfs.c fs/coda/dir.c +32 more+87 -810 replies
4/4Optimize NFS open() calls by means of 'intents'...fs/nfs/dir.c fs/nfs/file.c+49 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] Optimize NFS open() calls by means of 'intents'...

The following patches add the concept of 'intents' to the VFS layer, and are subsequently used to optimize the NFSv2/v3 close-to-open code, and to add O_EXCL support.

Intents are a concept which have been pioneered under Linux by Peter Braam. They are an optional field that is passed down to inode ops and are used in order to pass down extra information to the filesystem about the nature of the operation being undertaken.

This allows the filesystem in turn to make assumptions in order to optimize away unnecessary operations (for instance under NFS - doing both a LOOKUP and a GETATTR when doing an open), and to choose variants that improve the atomicity (For instance under NFSv4 you may choose to OPEN rather than LOOKUP).

So far, I have only implemented OPEN intents. In the future, it may prove to be useful to add intents for other operations (I know the Lustre project in particular is keen to do this) in order to optimize away unnecessary file permission checks, and other such things.

The patches presented now differ from those presented in May in that I've tried to take into account both Linus' and Al Viro's comments. The strategy is therefore to make use of the 'struct nameidata', when it exists, and feed that down to the filesystem. The actual intent information is then included as a union in the nameidata.

Cheers,
Trond