1. 30 5月, 2011 17 次提交
    • B
      pnfs-obj: osd raid engine read/write implementation · 04f83450
      Boaz Harrosh 提交于
      With the use of the in-kernel osd library. Implement read/write
      of data from/to osd-objects according to information specified
      in the objects-layout.
      
      Support for stripping over mirrors with a received stripe_unit.
      There are however a few constrains which are not supported:
       1. Stripe Unit must be a multiple of PAGE_SIZE
       2. stripe length (stripe_unit * number_of_stripes) can not be
          bigger then 32bit.
      
      Also support raid-groups and partial-layout. Partial-layout is
      when not all the groups are received on the line, addressing
      only a partial range of the file.
      
      TODO:
        Only raid0! raid 4/5/6 support will come at later stage
      
      A none supported layout will send IO through the MDS
      
      [Important fallout from the last rebase]
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      [gfp_flags]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      04f83450
    • B
      pnfs: support for non-rpc layout drivers · d20581aa
      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: NBoaz Harrosh <bharrosh@panasas.com>
      [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: NBenny Halevy <bhalevy@panasas.com>
      d20581aa
    • B
      pnfs-obj: define per-inode private structure · e51b841d
      Benny Halevy 提交于
      allocate and deallocate per-inode private pnfs_layout_hdr
      in preparation for I/O implementation.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      e51b841d
    • B
      pnfs: alloc and free layout_hdr layoutdriver methods · 636fb9c8
      Benny Halevy 提交于
      [gfp_flags]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      636fb9c8
    • B
      pnfs-obj: objio_osd device information retrieval and caching · b6c05f16
      Boaz Harrosh 提交于
      When a new layout is received in objio_alloc_lseg all device_ids
      referenced are retrieved. The device information is queried for from MDS
      and then the osd_device is looked-up from the osd-initiator library. The
      devices are cached in a per-mount-point list, for later use. At unmount
      all devices are "put" back to the library.
      
      objlayout_get_deviceinfo(), objlayout_put_deviceinfo() middleware
      API for retrieving device information given a device_id.
      
      TODO: The device cache can get big. Cap its size. Keep an LRU and start
            to return devices which were not used, when list gets to big, or
            when new entries allocation fail.
      
      [pnfs-obj: Bugs in new global-device-cache code]
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      [gfp_flags]
      [use global device cache]
      [use layout driver in global device cache]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      b6c05f16
    • B
      pnfs-obj: decode layout, alloc/free lseg · 09f5bf4e
      Boaz Harrosh 提交于
      objlayout_alloc_lseg prepares an xdr_stream and calls the
      raid engins objio_alloc_lseg() to allocate a private
      pnfs_layout_segment.
      
      objio_osd.c::objio_alloc_lseg() uses passed xdr_stream to
      decode and store the layout_segment information in an
      objio_segment struct, using the pnfs_osd_xdr.h API for
      the actual parsing the layout xdr.
      
      objlayout_free_lseg calls objio_free_lseg() to free the
      allocated space.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      [gfp_flags]
      [removed "extern" from function definitions]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      09f5bf4e
    • B
      pnfs-obj: pnfs_osd XDR client implementation · f1bc893a
      Boaz Harrosh 提交于
      * Add the fs/nfs/objlayout/pnfs_osd_xdr_cli.c file, which will
        include the XDR encode/decode implementations for the pNFS
        client objlayout driver.
      
      [Wrong type in comments]
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      f1bc893a
    • B
      pnfs-obj: pnfs_osd XDR definitions · 38b7c401
      Benny Halevy 提交于
      * Add the pnfs_osd_xdr.h header
      
      * defintions the pnfs_osd_layout structure including all it's
        sub-types and constants.
      * Declare the pnfs_osd_xdr_decode_layout API + all needed
        inline helpers.
      
      * Define the pnfs_osd_deviceaddr structure and all its subtypes and
        constants.
      * Declare API for decoding of a pnfs_osd_deviceaddr from XDR stream.
      
      * Define the pnfs_osd_ioerr structure, its substructures and constants.
      * Declare API for encoding of a pnfs_osd_ioerr into XDR stream.
      
      * Define the pnfs_osd_layoutupdate structure and its substructures.
      * Declare API for encoding of a pnfs_osd_layoutupdate into XDR stream.
      
      [Remove server definitions]
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      38b7c401
    • B
      pnfs-obj: objlayoutdriver module skeleton · c93407d0
      Benny Halevy 提交于
      * Define the PNFS_OBJLAYOUT Kconfig option in the nfs
        master Kconfig file.
      * Add the objlayout driver to the Kernel's Kbuild system.
      * Add the fs/nfs/objlayout/Kbuild file for building the
        objlayoutdriver.ko driver
      * Define fs/nfs/objlayout/objio_osd.c, register the driver on module
        initialization and unregister on exit.
      
      [pnfs-obj: remove of CONFIG_PNFS fallout]
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      [added "unsure" clause]
      [depend on NFS_V4_1]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      c93407d0
    • J
      pnfs: client stats · ae50c0b5
      J. Bruce Fields 提交于
      A pNFS client auto-negotiates a lot of features (minorversion level,
      pNFS layout type, etc.).  This is convenient, but makes certain kinds of
      failures hard for a user to detect.
      
      For example, if the client falls back on 4.0, or falls back to MDS IO
      because the user didn't connect to the right iscsi disks before
      mounting, the only symptoms may be reduced performance, which may not be
      noticed till long after the actual failure, and may be difficult for a
      user to diagnose.
      
      However, such "failures" may also be perfectly normal in some cases, so
      we don't want to spam the system logs with them.
      
      One approach would be to put some more information into
      /proc/self/mountstats.
      Signed-off-by: NJ. Bruce Fields <bfields@fieldses.org>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      [pnfs: add commit client stats]
      [fixup data types for "ret" variables in pnfs_try_to* inline funcs.]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      [fix definition of show_pnfs for !CONFIG_PNFS]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      [nfs41: Fix show_sessions in the not CONFIG_NFS_V4_1 case]
          There is a build error when CONFIG_NFS_V4 is set but
          CONFIG_NFS_V4_1 is *not* set. show_sessions() prototype
          was unbalanced between the two cases.
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      [pnfs: super.c remove CONFIG_PNFS]
      Signed-off-by: NAndy Adamson <andros@netapp.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      ae50c0b5
    • B
      pnfs: Use byte-range for cb_layoutrecall · 778b5502
      Benny Halevy 提交于
      Use recalled range to invalidate particular layout segments in the layout cache.
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      778b5502
    • B
      pnfs: align layoutget requests on page boundaries · 707ed5fd
      Benny Halevy 提交于
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      707ed5fd
    • B
      pnfs: Use byte-range for layoutget · fb3296eb
      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: NBenny Halevy <bhalevy@panasas.com>
      fb3296eb
    • B
      SUNRPC: introduce xdr_init_decode_pages · f7da7a12
      Benny Halevy 提交于
      Initialize xdr_stream and xdr_buf using an array of page pointers
      and length of buffer.
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      f7da7a12
    • B
      NFSv4.1: use layout driver in global device cache · 35c8bb54
      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: NBenny Halevy <bhalevy@panasas.com>
      35c8bb54
    • M
      pnfs: CB_NOTIFY_DEVICEID · 1be5683b
      Marc Eshel 提交于
      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: NBenny Halevy <bhalevy@panasas.com>
      [Bug in new global-device-cache code]
      [layout_driver MUST set free_deviceid_node if using dev-cache]
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      1be5683b
    • B
      NFSv4.1: purge deviceid cache on nfs_free_client · 1775bc34
      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: NBoaz Harrosh <bharrosh@panasas.com>
      [removed EXPORT_SYMBOL_GPL(nfs4_deviceid_purge_client)]
      Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
      1775bc34
  2. 29 5月, 2011 4 次提交
  3. 19 5月, 2011 6 次提交
  4. 18 5月, 2011 13 次提交