1. 04 Jun, 2011 1 commit
  2. 26 May, 2011 1 commit
  3. 25 Apr, 2011 2 commits
    • Li Zefan's avatar
      Btrfs: Support reading/writing on disk free ino cache · 82d5902d
      Li Zefan authored
      
      
      This is similar to block group caching.
      
      We dedicate a special inode in fs tree to save free ino cache.
      
      At the very first time we create/delete a file after mount, the free ino
      cache will be loaded from disk into memory. When the fs tree is commited,
      the cache will be written back to disk.
      
      To keep compatibility, we check the root generation against the generation
      of the special inode when loading the cache, so the loading will fail
      if the btrfs filesystem was mounted in an older kernel before.
      
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      82d5902d
    • Li Zefan's avatar
      Btrfs: Cache free inode numbers in memory · 581bb050
      Li Zefan authored
      
      
      Currently btrfs stores the highest objectid of the fs tree, and it always
      returns (highest+1) inode number when we create a file, so inode numbers
      won't be reclaimed when we delete files, so we'll run out of inode numbers
      as we keep create/delete files in 32bits machines.
      
      This fixes it, and it works similarly to how we cache free space in block
      cgroups.
      
      We start a kernel thread to read the file tree. By scanning inode items,
      we know which chunks of inode numbers are free, and we cache them in
      an rb-tree.
      
      Because we are searching the commit root, we have to carefully handle the
      cross-transaction case.
      
      The rb-tree is a hybrid extent+bitmap tree, so if we have too many small
      chunks of inode numbers, we'll use bitmaps. Initially we allow 16K ram
      of extents, and a bitmap will be used if we exceed this threshold. The
      extents threshold is adjusted in runtime.
      
      Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
      581bb050
  4. 28 Mar, 2011 1 commit
  5. 21 Sep, 2009 1 commit
  6. 27 Apr, 2009 1 commit
  7. 12 Feb, 2009 1 commit
    • Jeff Mahoney's avatar
      Btrfs: remove btrfs_init_path · e00f7308
      Jeff Mahoney authored
      
      
      btrfs_init_path was initially used when the path objects were on the
      stack.  Now all the work is done by btrfs_alloc_path and btrfs_init_path
      isn't required.
      
      This patch removes it, and just uses kmem_cache_zalloc to zero out the object.
      
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      e00f7308
  8. 05 Jan, 2009 1 commit
  9. 26 Sep, 2008 1 commit
    • Zheng Yan's avatar
      Btrfs: extent_map and data=ordered fixes for space balancing · 5b21f2ed
      Zheng Yan authored
      
      
      * Add an EXTENT_BOUNDARY state bit to keep the writepage code
      from merging data extents that are in the process of being
      relocated.  This allows us to do accounting for them properly.
      
      * The balancing code relocates data extents indepdent of the underlying
      inode.  The extent_map code was modified to properly account for
      things moving around (invalidating extent_map caches in the inode).
      
      * Don't take the drop_mutex in the create_subvol ioctl.  It isn't
      required.
      
      * Fix walking of the ordered extent list to avoid races with sys_unlink
      
      * Change the lock ordering rules.  Transaction start goes outside
      the drop_mutex.  This allows btrfs_commit_transaction to directly
      drop the relocation trees.
      
      Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
      5b21f2ed
  10. 25 Sep, 2008 4 commits
  11. 11 Jul, 2007 1 commit
  12. 12 Jun, 2007 1 commit
  13. 10 Apr, 2007 1 commit
  14. 05 Apr, 2007 1 commit
  15. 04 Apr, 2007 1 commit
  16. 02 Apr, 2007 1 commit
  17. 30 Mar, 2007 1 commit
  18. 27 Mar, 2007 1 commit
  19. 23 Mar, 2007 1 commit
  20. 22 Mar, 2007 1 commit
  21. 21 Mar, 2007 1 commit
  22. 20 Mar, 2007 1 commit