Skip to content

LAYOUTGET invocation

Fred Isaman linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest22 patches 8 repliesIn review

Patches in v1 No applies recorded yet

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

(My apologies for the 4 patches that went out about 1/2 hour ago. Please ignore those.)

This patch series limits LAYOUTGET invocation to the beginning of the IO paths.

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.

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

Patches 9-19 implement the change. NOTE that patch 19 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 20-22 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