1. 13 4月, 2010 1 次提交
  2. 31 3月, 2010 1 次提交
    • S
      ceph: fix dentry rehashing on virtual .snap dir · 9358c6d4
      Sage Weil 提交于
      If a lookup fails on the magic .snap directory, we bind it to a magic
      snap directory inode in ceph_lookup_finish().  That code assumes the dentry
      is unhashed, but a recent server-side change started returning NULL leases
      on lookup failure, causing the .snap dentry to be hashed and NULL by
      ceph_fill_trace().
      
      This causes dentry hash chain corruption, or a dies when d_rehash()
      includes
      	BUG_ON(!d_unhashed(entry));
      
      So, avoid processing the NULL dentry lease if it the dentry matches the
      snapdir name in ceph_fill_trace().  That allows the lookup completion to
      properly bind it to the snapdir inode.  BUG there if dentry is hashed to
      be sure.
      Signed-off-by: NSage Weil <sage@newdream.net>
      9358c6d4
  3. 23 3月, 2010 1 次提交
  4. 24 12月, 2009 1 次提交
  5. 22 12月, 2009 1 次提交
  6. 04 12月, 2009 1 次提交
  7. 12 11月, 2009 1 次提交
  8. 28 10月, 2009 1 次提交
  9. 07 10月, 2009 1 次提交
    • S
      ceph: directory operations · 2817b000
      Sage Weil 提交于
      Directory operations, including lookup, are defined here.  We take
      advantage of lookup intents when possible.  For the most part, we just
      need to build the proper requests for the metadata server(s) and
      pass things off to the mds_client.
      
      The results of most operations are normally incorporated into the
      client's cache when the reply is parsed by ceph_fill_trace().
      However, if the MDS replies without a trace (e.g., when retrying an
      update after an MDS failure recovery), some operation-specific cleanup
      may be needed.
      
      We can validate cached dentries in two ways.  A per-dentry lease may
      be issued by the MDS, or a per-directory cap may be issued that acts
      as a lease on the entire directory.  In the latter case, a 'gen' value
      is used to determine which dentries belong to the currently leased
      directory contents.
      
      We normally prepopulate the dcache and icache with readdir results.
      This makes subsequent lookups and getattrs avoid any server
      interaction.  It also lets us satisfy readdir operation by peeking at
      the dcache IFF we hold the per-directory cap/lease, previously
      performed a readdir, and haven't dropped any of the resulting
      dentries.
      Signed-off-by: NSage Weil <sage@newdream.net>
      2817b000