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

    Boaz Harrosh
     

19 Oct, 2011

3 commits


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

    Trond Myklebust
     
  • 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

    Fred Isaman
     
  • 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

    Andy Adamson
     
  • 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

    Benny Halevy
     
  • 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

    Andy Adamson
     
  • 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

    Peng Tao
     
  • 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

    Peng Tao
     
  • 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

    Peng Tao
     

15 Jul, 2011

2 commits


13 Jul, 2011

5 commits


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

    Weston Andros Adamson
     

30 May, 2011

14 commits

  • Signed-off-by: Benny Halevy

    Benny Halevy
     
  • Signed-off-by: Benny Halevy

    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

    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

    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

    Andy Adamson
     
  • 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

    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

    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

    Benny Halevy
     
  • [gfp_flags]
    Signed-off-by: Benny Halevy

    Benny Halevy
     
  • Use recalled range to invalidate particular layout segments in the layout cache.

    Signed-off-by: Benny Halevy

    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

    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

    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

    Marc Eshel
     
  • 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

    Benny Halevy
     

29 May, 2011

2 commits


12 May, 2011

1 commit


25 Mar, 2011

2 commits


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

    Andy Adamson