06 Jan, 2012
1 commit
-
As mandated by the standard. In case of an IO error, a pNFS
objects layout driver must return it's layout. This is because
all device errors are reported to the server as part of the
layout return buffer.This is implemented the same way PNFS_LAYOUTRET_ON_SETATTR
is done, through a bit flag on the pnfs_layoutdriver_type->flags
member. The flag is set by the layout driver that wants a
layout_return preformed at pnfs_ld_{write,read}_done in case
of an error.
(Though I have not defined a wrapper like pnfs_ld_layoutret_on_setattr
because this code is never called outside of pnfs.c and pnfs IO
paths)Without this patch 3.[0-2] Kernels leak memory and have an annoying
WARN_ON after every IO error utilizing the pnfs-obj driver.[This patch is for 3.2 Kernel. 3.1/0 Kernels need a different patch]
CC: Stable Tree
Signed-off-by: Boaz Harrosh
Signed-off-by: Trond Myklebust
19 Oct, 2011
3 commits
-
For pnfs pagelist read failure, we need to pg_recoalesce and resend IO to
mds.Signed-off-by: Peng Tao
Signed-off-by: Jim Rees
Cc: stable@kernel.org [3.0]
Signed-off-by: Trond Myklebust -
For pnfs pagelist write failure, we need to pg_recoalesce and resend IO to
mds.Signed-off-by: Peng Tao
Signed-off-by: Jim Rees
Cc: stable@kernel.org [3.0]
Signed-off-by: Trond Myklebust -
file layout and block layout both use it to set mark layout io failure
bit. So make it generic.Signed-off-by: Peng Tao
Signed-off-by: Jim Rees
Cc: stable@kernel.org [3.0]
Signed-off-by: Trond Myklebust
01 Aug, 2011
8 commits
-
Fix two recently introduced compile problems:
Fix a typo in fs/nfs/pnfs.h
Move the pnfs_blksize declaration outside the CONFIG_NFS_V4 section in
struct nfs_server.Reported-by: Jens Axboe
Signed-off-by: Trond Myklebust
Signed-off-by: Linus Torvalds -
Call GETDEVICELIST during mount, then call and parse GETDEVICEINFO
for each device returned.[pnfsblock: get rid of deprecated xdr macros]
Signed-off-by: Jim Rees
[pnfsblock: fix pnfs_deviceid references]
Signed-off-by: Fred Isaman
[pnfsblock: fix print format warnings for sector_t and size_t]
[pnfs-block: #include ]
[pnfsblock: no PNFS_NFS_SERVER]
Signed-off-by: Benny Halevy
[pnfsblock: fix bug determining size of striped volume]
[pnfsblock: fix oops when using multiple devices]
Signed-off-by: Fred Isaman
Signed-off-by: Benny Halevy
Signed-off-by: Benny Halevy
[pnfsblock: get rid of vmap and deviceid->area structure]
Signed-off-by: Peng Tao
Signed-off-by: Jim Rees
Signed-off-by: Trond Myklebust -
This gives layout driver a chance to cleanup structures they put in at
encode_layoutcommit.Signed-off-by: Andy Adamson
[fixup layout header pointer for layoutcommit]
Signed-off-by: Benny Halevy
Signed-off-by: Benny Halevy
[rm inode and pnfs_layout_hdr args from cleanup_layoutcommit()]
Signed-off-by: Jim Rees
Signed-off-by: Trond Myklebust -
To allow layout driver to issue getdevicelist at mount time, and clean up
at umount time.[fixup non NFS_V4_1 set_pnfs_layoutdriver definition]
[pnfs: pass mntfh down the init_pnfs path]
Signed-off-by: Benny Halevy
Signed-off-by: Benny Halevy
Signed-off-by: Jim Rees
Signed-off-by: Trond Myklebust -
The block driver uses GETDEVICELIST
Signed-off-by: Andy Adamson
[pass struct nfs_server * to getdevicelist]
[get machince creds for getdevicelist]
[fix getdevicelist decode sizing]
Signed-off-by: Benny Halevy
Signed-off-by: Benny Halevy
Signed-off-by: Jim Rees
Signed-off-by: Trond Myklebust -
There can be multiple lseg per file, so layoutcommit should be
able to handle it.[Needed in v3.0]
CC: Stable Tree
Signed-off-by: Peng Tao
Signed-off-by: Boaz Harrosh
Signed-off-by: Jim Rees
Signed-off-by: Trond Myklebust -
No need to save it for every lseg.
No need to save it at every pnfs_set_layoutcommit.[Needed in v3.0]
CC: Stable Tree
Signed-off-by: Peng Tao
Signed-off-by: Boaz Harrosh
Signed-off-by: Jim Rees
Signed-off-by: Trond Myklebust -
No need to save it for every lseg.
[Needed in v3.0]
CC: Stable Tree
Signed-off-by: Peng Tao
Signed-off-by: Jim Rees
Signed-off-by: Trond Myklebust
15 Jul, 2011
2 commits
-
...and ensure that we recoalese to take into account differences in
differences in block sizes when falling back to write through the MDS.Signed-off-by: Trond Myklebust
-
...and ensure that we recoalese to take into account differences in
block sizes when falling back to read through the MDS.Signed-off-by: Trond Myklebust
13 Jul, 2011
5 commits
-
Mark all deviceids established under an expired MDS clientid as invalid.
Stop all new i/o through DS and send through the MDS.
Don't use any new LAYOUTGETs that use the invalid deviceid. Purge all layouts
established under the expired MDS clientid.
Remove the MDS clientid deviceid and data servers referenceSigned-off-by: Andy Adamson
Signed-off-by: Trond Myklebust -
Ask for whole file layouts. Until support for layout segments is fully
supported in the file layout code, discard non-whole file layouts.Signed-off-by: Andy Adamson
Signed-off-by: Fred Isaman
Signed-off-by: Trond Myklebust -
The fact that the global device id cache holds a reference to the
nfs4_deviceid_node until it is invisible to rcu lookups implies that
we can always assume that the reference count is non-zero in
_find_get_deviceid.Also clean up nfs4_put_deviceid_node and the removal of the device id
from the cache.Signed-off-by: Trond Myklebust
-
Ensure that we always get a layout before setting up the i/o request.
Signed-off-by: Trond Myklebust
-
We need to ensure that the layouts are set up before we can decide to
coalesce requests. To do so, we want to further split up the struct
nfs_pageio_descriptor operations into an initialisation callback, a
coalescing test callback, and a 'do i/o' callback.This patch cleans up the existing callback methods before adding the
'initialisation' callback.Signed-off-by: Trond Myklebust
15 Jun, 2011
1 commit
-
Unmounting a pnfs filesystem hangs using filelayout and possibly others.
This fixes the use of the rcu protected node by making use of a new 'tmpnode'
for the temporary purge list. Also, the spinlock shouldn't be held when calling
synchronize_rcu().Signed-off-by: Weston Andros Adamson
Signed-off-by: Andy Adamson
Signed-off-by: Trond Myklebust
30 May, 2011
14 commits
-
Signed-off-by: Benny Halevy
-
Signed-off-by: Benny Halevy
-
Use common code for pnfs_pageio_init_{read,write} and use
a common generic pg_test function.Note that this function always assumes the the layout driver's
pg_test method is implemented.[Fix BUG]
Signed-off-by: Boaz Harrosh
Signed-off-by: Benny Halevy -
Add a layout driver method to encode the layout type specific
opaque part of layout commit in-line in the xdr stream.Currently, the pnfs-objects layout driver uses it to encode metadata hints
to the MDS and the blocks layout driver to commit provisionally allocated
extents to the file.Signed-off-by: Benny Halevy
-
Add a layout driver method to encode the layout type specific
opaque part of layout return in-line in the xdr stream.Currently the pnfs-objects layout driver uses it to encode i/o error
information on LAYOUTRETURN.Signed-off-by: Andy Adamson
[fixup layout header pointer for encode_layoutreturn]
Signed-off-by: Benny Halevy -
With the objects layout security model, we have object capabilities
that are associated with the layout and we anticipate that the server
will issue a cb_layoutrecall for any setattr that changes security
related attributes (user/group/mode/acl) or truncates the file.Therefore, the layout is returned before issuing the setattr to avoid
the anticipated cb_layoutrecall.Signed-off-by: Benny Halevy
-
NFSv4.1 LAYOUTRETURN implementation
Currently, does not support layout-type payload encoding.
Signed-off-by: Alexandros Batsakis
Signed-off-by: Andy Adamson
Signed-off-by: Andy Adamson
Signed-off-by: Dean Hildebrand
Signed-off-by: Fred Isaman
Signed-off-by: Fred Isaman
Signed-off-by: Marc Eshel
Signed-off-by: Zhang Jingwang
[call pnfs_return_layout right before pnfs_destroy_layout]
[remove assert_spin_locked from pnfs_clear_lseg_list]
[remove wait parameter from the layoutreturn path.]
[remove return_type field from nfs4_layoutreturn_args]
[remove range from nfs4_layoutreturn_args]
[no need to send layoutcommit from _pnfs_return_layout]
[don't wait on sync layoutreturn]
[fix layout stateid in layoutreturn args]
[fixed NULL deref in _pnfs_return_layout]
[removed recaim member of nfs4_layoutreturn_args]
Signed-off-by: Benny Halevy -
Non-rpc layout driver such as for objects and blocks
implement their own I/O path and error handling logic.
Therefore bypass NFS-based error handling for these layout drivers.[fix lseg ref-count bugs, and null de-refs]
[Fall out from: non-rpc layout drivers]
Signed-off-by: Boaz Harrosh
[get rid of PNFS_USE_RPC_CODE]
[get rid of __nfs4_write_done_cb]
[revert useless change in nfs4_write_done_cb]
Signed-off-by: Benny Halevy -
[gfp_flags]
Signed-off-by: Benny Halevy -
Use recalled range to invalidate particular layout segments in the layout cache.
Signed-off-by: Benny Halevy
-
Add offset and count parameters to pnfs_update_layout and use them to get
the layout in the pageio path.Order cache layout segments in the following order:
* offset (ascending)
* length (descending)
* iomode (RW before READ)Test byte range against the layout segment in use in pnfs_{read,write}_pg_test
so not to coalesce pages not using the same layout segment.[fix lseg ordering]
[clean up pnfs_find_lseg lseg arg]
[remove unnecessary FIXME]
[fix ordering in pnfs_insert_layout]
[clean up pnfs_insert_layout]
Signed-off-by: Benny Halevy -
pnfs deviceids are unique per server, per layout type.
struct nfs_client is currently used to distinguish deviceids from
different nfs servers, yet these may clash between different layout
types on the same server. Therefore, use the layout driver associated
with each deviceid at insertion time to look it up, unhash, or
delete it.Signed-off-by: Benny Halevy
-
Note: This functionlaity is incomplete as all layout segments referring to
the 'to be removed device id' need to be reaped, and all in flight I/O drained.[use be32 res in nfs4_callback_devicenotify]
[use nfs_client to qualify deviceid for cb_notify_deviceid]
[use global deviceid cache for CB_NOTIFY_DEVICEID]
[refactor device cache _lookup_deviceid]
[refactor device cache _find_get_deviceid]
Signed-off-by: Benny Halevy
[Bug in new global-device-cache code]
[layout_driver MUST set free_deviceid_node if using dev-cache]
Signed-off-by: Boaz Harrosh
Signed-off-by: Benny Halevy -
Use the pnfs_layoutdriver_type both as a qualifier for the deviceid,
distinguishing deviceid from different layout types on the server,
and for freeing the layout-driver allocated structure containing the
nfs4_deviceid_node.[BUG in _deviceid_purge_client]
[layout_driver MUST set free_deviceid_node if using dev-cache]
[let ver < 4.1 compile]
Signed-off-by: Boaz Harrosh
[removed EXPORT_SYMBOL_GPL(nfs4_deviceid_purge_client)]
Signed-off-by: Benny Halevy
29 May, 2011
2 commits
-
Move deviceid cache from the pnfs files layout driver to the
generic layer in preparation for the objects layout driver.Signed-off-by: Benny Halevy
-
Some definitions in the header file depend on nfs_fs.h so pnfs.h can't
be included independently.Signed-off-by: Benny Halevy
12 May, 2011
1 commit
-
Currently, writebacks may end up recursing back into the filesystem due to
GFP_KERNEL direct reclaims in the pnfs subsystem.Signed-off-by: Trond Myklebust
25 Mar, 2011
2 commits
-
changes LAYOUTGET and GETDEVICEINFO XDR parsing to:
- not use vmap, which doesn't work on incoherent archs
- use xdr_stream parsing for all xdrSigned-off-by: Weston Andros Adamson
Signed-off-by: Trond Myklebust -
Signed-off-by: Andy Adamson
Signed-off-by: Trond Myklebust
24 Mar, 2011
1 commit
-
The filelayout driver sends LAYOUTCOMMIT only when COMMIT goes to
the data server (as opposed to the MDS) and the data server WRITE
is not NFS_FILE_SYNC.Only whole file layout support means that there is only one IOMODE_RW layout
segment.Signed-off-by: Andy Adamson
Signed-off-by: Alexandros Batsakis
Signed-off-by: Boaz Harrosh
Signed-off-by: Dean Hildebrand
Signed-off-by: Fred Isaman
Signed-off-by: Mingyang Guo
Signed-off-by: Tao Guo
Signed-off-by: Zhang Jingwang
Tested-by: Boaz Harrosh
Signed-off-by: Benny Halevy
Signed-off-by: Fred Isaman
Signed-off-by: Trond Myklebust