Skip to content

LAYOUTGET invocation (rebased)

Fred Isaman linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest24 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24Revert "pnfs-nonfilelayout: Prelim support for non-file layout O_DIRECT"fs/nfs/direct.c+0 -101 reply
2/24Revert "pnfs: Enable O_DIRECT write path."fs/nfs/direct.c+1 -400 replies
3/24Revert "pnfs: Enable O_DIRECT read path."fs/nfs/direct.c+1 -250 replies
4/24Revert "pnfs: Add function to set up O_DIRECT I/O"fs/nfs/pnfs.c fs/nfs/pnfs.h+0 -560 replies
5/24SQUASHME: ensure pnfs_update_lseg clears lsegp on errorfs/nfs/pnfs.c+3 -01 reply
6/24pnfs: filelayout: clean and breakup nfs4_pnfs_dserver_getfs/nfs/nfs4filelayout.c fs/nfs/nfs4filelayout.h fs/nfs/nfs4filelayoutdev.c+75 -1280 replies
7/24pnfs: filelayout: remove some dead code from filelayout_commitfs/nfs/nfs4filelayout.c+2 -80 replies
8/24pnfs: remove PNFS_LAYOUTGET_ON_OPENfs/nfs/nfs4filelayout.c include/linux/nfs4_pnfs.h+1 -160 replies
9/24pnfs: track the number of outstanding commitsfs/nfs/nfs4filelayout.c fs/nfs/write.c include/linux/nfs_xdr.h+21 -30 replies
10/24pnfs_submit: mandate basic io path operations for layout driversfs/nfs/pnfs.c+8 -00 replies
11/24pnfs_submit: expose pnfs_update_layout, put_lseg, and get_lseg functionsfs/nfs/pnfs.c fs/nfs/pnfs.h+75 -142 replies
12/24pnfs_submit: stash and refcount lseg in read pathfs/nfs/pagelist.c fs/nfs/pnfs.c fs/nfs/read.c +2 more+24 -70 replies
13/24pnfs_submit: read path changeoverfs/nfs/pagelist.c fs/nfs/pnfs.c fs/nfs/pnfs.h+25 -395 replies
14/24pnfs_submit: use fsdata to pass lsegfs/nfs/file.c+13 -37 replies
15/24pnfs_submit: stash and refcount lseg in write pathfs/nfs/file.c fs/nfs/write.c include/linux/nfs_fs.h+33 -190 replies
16/24pnfs_submit: remove pnfs_file_operationsfs/nfs/file.c fs/nfs/nfs4proc.c fs/nfs/pnfs.c +2 more+0 -641 reply
17/24pnfs_submit: remove pnfs_update_layout_commitfs/nfs/pnfs.c fs/nfs/pnfs.h fs/nfs/write.c+1 -470 replies
18/24pnfs_submit: remove pnfs_writepages LAYOUTGET invocationfs/nfs/pnfs.c fs/nfs/pnfs.h+13 -390 replies
19/24pnfs: export some commit error handling for use by layout driversfs/nfs/internal.h fs/nfs/write.c+19 -110 replies
20/24pnfs_submit: API change: remove pnfs_commit layoutget invocationfs/nfs/internal.h fs/nfs/pagelist.c fs/nfs/pnfs.c +3 more+43 -904 replies
21/24pnfs_submit: filelayout: rewrite filelayout_commit to use new APIfs/nfs/nfs4filelayout.c fs/nfs/write.c+115 -860 replies
22/24pnfs_submit: remove unecessary pnfs_fl_call_data field pnfs_clientfs/nfs/nfs4filelayout.c include/linux/nfs_xdr.h+3 -70 replies
23/24pnfs_submit: remove unecessary pnfs_fl_call_data field commit_through_mdsfs/nfs/nfs4proc.c include/linux/nfs_xdr.h+4 -50 replies
24/24pnfs_submit: pnfs_update_layout can return voidfs/nfs/pnfs.c fs/nfs/pnfs.h+13 -250 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 00/24] LAYOUTGET invocation (rebased)

This patch series limits LAYOUTGET invocation to the beginning of the IO paths. It applies atop Alexandros's recent patchset submission, but is otherwise basically the same as the previous submission. It is intended for the pnfs_submit branch, without reversion in a post_submit branch.

Patches 1-4 revert direct IO. Commit is already broken, and this series breaks them further. The problem is that the direct IO redefines data->wb_req and data->pages, so that it can only work with the pnfs code if we don't look at those fields. The reverted code should be saved somewhere. I tend to agree with Boaz that keeping it in git is preferable, but I can supply a patch which returns the code ifdef'ed out if tht is preferred.

Patches 5-9 do some code cleanup in preperation for the real work.

Patches 10-21 implement the change. NOTE that patch 20 changes the calling convention of the layout drivers commit calls. There is no longer a universal lseg for the commit, instead each nfs_page has an lseg attached, with NULL meaning to go through the MDS.

Patches 21-24 rework the filelayout commit function, and then do some code cleanup this enables.

The basic idea of these patches is as follows:

We attempt to grab a lseg (possibly invoking LAYOUTGET) early in the IO. If we succeed, we refcount and stash it, using it through the rest of the io. If we fail, we revert to straight nfs, even if the area becomes covered by a layout due to other io.

The tricky, though hopefully anomalous, case is when we start without the layout, but have it at this particular stage of the IO. We ignore this for the moment at write_pages, which will cause block and object to issue CB_LAYOUTRECALL. At commit, it is tricky to handle, but since block doesn't use commit, and file needs to handle complicated splitting anyway, I just push all complicated decisions of splitting commit between nfs (for IO started without layout) and pnfs to the driver.

Fred