1. 23 9月, 2009 3 次提交
  2. 05 9月, 2009 5 次提交
    • J
      ocfs2: Pass struct ocfs2_caching_info to the journal functions. · 0cf2f763
      Joel Becker 提交于
      The next step in divorcing metadata I/O management from struct inode is
      to pass struct ocfs2_caching_info to the journal functions.  Thus the
      journal locks a metadata cache with the cache io_lock function.  It also
      can compare ci_last_trans and ci_created_trans directly.
      
      This is a large patch because of all the places we change
      ocfs2_journal_access..(handle, inode, ...) to
      ocfs2_journal_access..(handle, INODE_CACHE(inode), ...).
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      0cf2f763
    • J
      ocfs2: move ip_created_trans to struct ocfs2_caching_info · 292dd27e
      Joel Becker 提交于
      Similar ip_last_trans, ip_created_trans tracks the creation of a journal
      managed inode.  This specifically tracks what transaction created the
      inode.  This is so the code can know if the inode has ever been written
      to disk.
      
      This behavior is desirable for any journal managed object.  We move it
      to struct ocfs2_caching_info as ci_created_trans so that any object
      using ocfs2_caching_info can rely on this behavior.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      292dd27e
    • J
      ocfs2: move ip_last_trans to struct ocfs2_caching_info · 66fb345d
      Joel Becker 提交于
      We have the read side of metadata caching isolated to struct
      ocfs2_caching_info, now we need the write side.  This means the journal
      functions.  The journal only does a couple of things with struct inode.
      
      This change moves the ip_last_trans field onto struct
      ocfs2_caching_info as ci_last_trans.  This field tells the journal
      whether a pending journal flush is required.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      66fb345d
    • J
      ocfs2: Change metadata caching locks to an operations structure. · 6e5a3d75
      Joel Becker 提交于
      We don't really want to cart around too many new fields on the
      ocfs2_caching_info structure.  So let's wrap all our access of the
      parent object in a set of operations.  One pointer on caching_info, and
      more flexibility to boot.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      6e5a3d75
    • J
      ocfs2: Make the ocfs2_caching_info structure self-contained. · 47460d65
      Joel Becker 提交于
      We want to use the ocfs2_caching_info structure in places that are not
      inodes.  To do that, it can no longer rely on referencing the inode
      directly.
      
      This patch moves the flags to ocfs2_caching_info->ci_flags, stores
      pointers to the parent's locks on the ocfs2_caching_info, and renames
      the constants and flags to reflect its independant state.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      47460d65
  3. 22 7月, 2009 1 次提交
    • J
      ocfs2: Fix deadlock on umount · f7b1aa69
      Jan Kara 提交于
      In commit ea455f8a, we moved the dentry lock
      put process into ocfs2_wq. This causes problems during umount because ocfs2_wq
      can drop references to inodes while they are being invalidated by
      invalidate_inodes() causing all sorts of nasty things (invalidate_inodes()
      ending in an infinite loop, "Busy inodes after umount" messages etc.).
      
      We fix the problem by stopping ocfs2_wq from doing any further releasing of
      inode references on the superblock being unmounted, wait until it finishes
      the current round of releasing and finally cleaning up all the references in
      dentry_lock_list from ocfs2_put_super().
      
      The issue was tracked down by Tao Ma <tao.ma@oracle.com>.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      f7b1aa69
  4. 23 6月, 2009 2 次提交
  5. 04 6月, 2009 3 次提交
    • J
      ocfs2: Add statistics for the checksum and ecc operations. · 73be192b
      Joel Becker 提交于
      It would be nice to know how often we get checksum failures.  Even
      better, how many of them we can fix with the single bit ecc.  So, we add
      a statistics structure.  The structure can be installed into debugfs
      wherever the user wants.
      
      For ocfs2, we'll put it in the superblock-specific debugfs directory and
      pass it down from our higher-level functions.  The stats are only
      registered with debugfs when the filesystem supports metadata ecc.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      73be192b
    • S
      ocfs2 patch to track delayed orphan scan timer statistics · 15633a22
      Srinivas Eeda 提交于
      Patch to track delayed orphan scan timer statistics.
      
      Modifies ocfs2_osb_dump to print the following:
        Orphan Scan=> Local: 10  Global: 21  Last Scan: 67 seconds ago
      Signed-off-by: NSrinivas Eeda <srinivas.eeda@oracle.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      15633a22
    • S
      ocfs2: timer to queue scan of all orphan slots · 83273932
      Srinivas Eeda 提交于
      When a dentry is unlinked, the unlinking node takes an EX on the dentry lock
      before moving the dentry to the orphan directory. Other nodes that have
      this dentry in cache have a PR on the same dentry lock.  When the EX is
      requested, the other nodes flag the corresponding inode as MAYBE_ORPHANED
      during downconvert.  The inode is finally deleted when the last node to iput
      the inode sees that i_nlink==0 and the MAYBE_ORPHANED flag is set.
      
      A problem arises if a node is forced to free dentry locks because of memory
      pressure. If this happens, the node will no longer get downconvert
      notifications for the dentries that have been unlinked on another node.
      If it also happens that node is actively using the corresponding inode and
      happens to be the one performing the last iput on that inode, it will fail
      to delete the inode as it will not have the MAYBE_ORPHANED flag set.
      
      This patch fixes this shortcoming by introducing a periodic scan of the
      orphan directories to delete such inodes. Care has been taken to distribute
      the workload across the cluster so that no one node has to perform the task
      all the time.
      Signed-off-by: NSrinivas Eeda <srinivas.eeda@oracle.com>
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      83273932
  6. 04 4月, 2009 8 次提交
  7. 27 2月, 2009 1 次提交
  8. 03 2月, 2009 1 次提交
  9. 06 1月, 2009 9 次提交
    • M
      ocfs2: Add directory block trailers. · 87d35a74
      Mark Fasheh 提交于
      Future ocfs2 features metaecc and indexed directories need to store a
      little bit of data in each dirblock.  For compatibility, we place this
      in a trailer at the end of the dirblock.  The trailer plays itself as an
      empty dirent, so that if the features are turned off, it can be reused
      without requiring a tunefs scan.
      
      This code adds the trailer and validates it when the block is read in.
      
      [ Mark is the original author, but I reinserted this code before his
        dir index work.  -- Joel ]
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      87d35a74
    • J
      ocfs2: Use metadata-specific ocfs2_journal_access_*() functions. · 13723d00
      Joel Becker 提交于
      The per-metadata-type ocfs2_journal_access_*() functions hook up jbd2
      commit triggers and allow us to compute metadata ecc right before the
      buffers are written out.  This commit provides ecc for inodes, extent
      blocks, group descriptors, and quota blocks.  It is not safe to use
      extened attributes and metaecc at the same time yet.
      
      The ocfs2_extent_tree and ocfs2_path abstractions in alloc.c both hide
      the type of block at their root.  Before, it didn't matter, but now the
      root block must use the appropriate ocfs2_journal_access_*() function.
      To keep this abstract, the structures now have a pointer to the matching
      journal_access function and a wrapper call to call it.
      
      A few places use naked ocfs2_write_block() calls instead of adding the
      blocks to the journal.  We make sure to calculate their checksum and ecc
      before the write.
      
      Since we pass around the journal_access functions.  Let's typedef them
      in ocfs2.h.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      13723d00
    • J
      ocfs2: Add the underlying blockcheck code. · 70ad1ba7
      Joel Becker 提交于
      This is the code that computes crc32 and ecc for ocfs2 metadata blocks.
      There are high-level functions that check whether the filesystem has the
      ecc feature, mid-level functions that work on a single block or array of
      buffer_heads, and the low-level ecc hamming code that can handle
      multiple buffers like crc32_le().
      
      It's not hooked up to the filesystem yet.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      70ad1ba7
    • J
      ocfs2: Enable quota accounting on mount, disable on umount · 19ece546
      Jan Kara 提交于
      Enable quota usage tracking on mount and disable it on umount. Also
      add support for quota on and quota off quotactls and usrquota and
      grpquota mount options. Add quota features among supported ones.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      19ece546
    • J
      ocfs2: Implement quota recovery · 2205363d
      Jan Kara 提交于
      Implement functions for recovery after a crash. Functions just
      read local quota file and sync info to global quota file.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      2205363d
    • J
      ocfs2: Wrap extent block reads in a dedicated function. · 5e96581a
      Joel Becker 提交于
      We weren't consistently checking extent blocks after we read them.
      Most places checked the signature, but none checked h_blkno or
      h_fs_signature.  Create a toplevel ocfs2_read_extent_block() that does
      the read and the validation.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      5e96581a
    • J
      ocfs2: Morph the haphazard OCFS2_IS_VALID_GROUP_DESC() checks. · 42035306
      Joel Becker 提交于
      Random places in the code would check a group descriptor bh to see if it
      was valid. The previous commit unified descriptor block reads,
      validating all block reads in the same place.  Thus, these checks are no
      longer necessary.  Rather than eliminate them, however, we change them
      to BUG_ON() checks.  This ensures the assumptions remain true.  All of
      the code paths to these checks have been audited to ensure they come
      from a validated descriptor read.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      42035306
    • J
      ocfs2: Morph the haphazard OCFS2_IS_VALID_DINODE() checks. · 10995aa2
      Joel Becker 提交于
      Random places in the code would check a dinode bh to see if it was
      valid.  Not only did they do different levels of validation, they
      handled errors in different ways.
      
      The previous commit unified inode block reads, validating all block
      reads in the same place.  Thus, these haphazard checks are no longer
      necessary.  Rather than eliminate them, however, we change them to
      BUG_ON() checks.  This ensures the assumptions remain true.  All of the
      code paths to these checks have been audited to ensure they come from a
      validated inode read.
      Signed-off-by: NJoel Becker <joel.becker@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      10995aa2
    • T
      ocfs2: add POSIX ACL API · 929fb014
      Tiger Yang 提交于
      This patch adds POSIX ACL(access control lists) APIs in ocfs2. We convert
      struct posix_acl to many ocfs2_acl_entry and regard them as an extended
      attribute entry.
      Signed-off-by: NTiger Yang <tiger.yang@oracle.com>
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      929fb014
  10. 02 12月, 2008 1 次提交
  11. 11 11月, 2008 1 次提交
  12. 14 10月, 2008 5 次提交