1. 30 5月, 2011 12 次提交
    • 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: 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. 18 5月, 2011 4 次提交
    • J
      configfs: Fix race between configfs_readdir() and configfs_d_iput() · 24307aa1
      Joel Becker 提交于
      configfs_readdir() will use the existing inode numbers of inodes in the
      dcache, but it makes them up for attribute files that aren't currently
      instantiated.  There is a race where a closing attribute file can be
      tearing down at the same time as configfs_readdir() is trying to get its
      inode number.
      
      We want to get the inode number of open attribute files, because they
      should match while instantiated.  We can't lock down the transition
      where dentry->d_inode is set to NULL, so we just check for NULL there.
      We can, however, ensure that an inode we find isn't iput() in
      configfs_d_iput() until after we've accessed it.
      Signed-off-by: NJoel Becker <jlbec@evilplan.org>
      24307aa1
    • J
      configfs: Don't try to d_delete() negative dentries. · df7f9967
      Joel Becker 提交于
      When configfs is faking mkdir() on its subsystem or default group
      objects, it starts by adding a negative dentry.  It then tries to
      instantiate the group.  If that should fail, it must clean up after
      itself.
      
      I was using d_delete() here, but configfs_attach_group() promises to
      return an empty dentry on error.  d_delete() explodes with the entry
      dentry.  Let's try d_drop() instead.  The unhashing is what we want for
      our dentry.
      Signed-off-by: NJoel Becker <jlbec@evilplan.org>
      df7f9967
    • J
      cifs: fix cifsConvertToUCS() for the mapchars case · 11379b5e
      Jeff Layton 提交于
      As Metze pointed out, commit 84cdf74e broke mapchars option:
      
          Commit "cifs: fix unaligned accesses in cifsConvertToUCS"
          (84cdf74e) does multiple steps
          in just one commit (moving the function and changing it without
          testing).
      
          put_unaligned_le16(temp, &target[j]); is never called for any
          codepoint the goes via the 'default' switch statement. As a result
          we put just zero (or maybe uninitialized) bytes into the target
          buffer.
      
      His proposed patch looks correct, but doesn't apply to the current head
      of the tree. This patch should also fix it.
      
      Cc: <stable@kernel.org> # .38.x: 581ade4d: cifs: clean up various nits in unicode routines (try #2)
      Reported-by: NStefan Metzmacher <metze@samba.org>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      11379b5e
    • J
      cifs: add fallback in is_path_accessible for old servers · 221d1d79
      Jeff Layton 提交于
      The is_path_accessible check uses a QPathInfo call, which isn't
      supported by ancient win9x era servers. Fall back to an older
      SMBQueryInfo call if it fails with the magic error codes.
      
      Cc: stable@kernel.org
      Reported-and-Tested-by: NSandro Bonazzola <sandro.bonazzola@gmail.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      221d1d79
  4. 15 5月, 2011 5 次提交
  5. 14 5月, 2011 8 次提交
  6. 12 5月, 2011 6 次提交
  7. 10 5月, 2011 1 次提交