1. 19 3月, 2010 4 次提交
    • C
      Btrfs: fix the inode ref searches done by btrfs_search_path_in_tree · 8ad6fcab
      Chris Mason 提交于
      This is used by the inode lookup ioctl to follow all the backrefs up
      to the subvol root.  But the search being done would sometimes land one
      past the last item in the leaf instead of finding the backref.
      
      This changes the search to look for the highest possible backref and hop
      back one item.  It also fixes a leaked path on failure to find the root.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      8ad6fcab
    • C
      Btrfs: allow treeid==0 in the inode lookup ioctl · 1b53ac4d
      Chris Mason 提交于
      When a root id of 0 is sent to the inode lookup ioctl, it will
      use the root of the file we're ioctling and pass the root id
      back to userland along with the results.
      
      This allows userland to do searches based on that root later on.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      1b53ac4d
    • C
      Btrfs: return keys for large items to the search ioctl · 90fdde14
      Chris Mason 提交于
      The search ioctl was skipping large items entirely (ones that are too
      big for the results buffer).  This changes things to at least copy
      the item header so that we can send information about the item back to
      userland.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      90fdde14
    • C
      Btrfs: fix key checks and advance in the search ioctl · abc6e134
      Chris Mason 提交于
      The search ioctl was working well for finding tree roots, but using it for
      generic searches requires a few changes to how the keys are advanced.
      This treats the search control min fields for objectid, type and offset
      more like a key, where we drop the offset to zero once we bump the type,
      etc.
      
      The downside of this is that we are changing the min_type and min_offset
      fields during the search, and so the ioctl caller needs extra checks to make sure
      the keys in the result are the ones it wanted.
      
      This also changes key_in_sk to use btrfs_comp_cpu_keys, just to make
      things more readable.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      abc6e134
  2. 18 3月, 2010 2 次提交
  3. 17 3月, 2010 6 次提交
  4. 16 3月, 2010 1 次提交
  5. 15 3月, 2010 24 次提交
  6. 14 3月, 2010 3 次提交