1. 14 Jun, 2013 30 commits
  2. 08 Jun, 2013 5 commits
  3. 18 May, 2013 5 commits
    • Chris Mason's avatar
    • Chris Mason's avatar
      Btrfs: use a btrfs bioset instead of abusing bio internals · 9be3395b
      Chris Mason authored
      Btrfs has been pointer tagging bi_private and using bi_bdev
      to store the stripe index and mirror number of failed IOs.
      
      As bios bubble back up through the call chain, we use these
      to decide if and how to retry our IOs.  They are also used
      to count IO failures on a per device basis.
      
      Recently a bio tracepoint was added lead to crashes because
      we were abusing bi_bdev.
      
      This commit adds a btrfs bioset, and creates explicit fields
      for the mirror number and stripe index.  The plan is to
      extend this structure for all of the fields currently in
      struct btrfs_bio, which will mean one less kmalloc in
      our IO path.
      Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
      Reported-by: default avatarTejun Heo <tj@kernel.org>
      9be3395b
    • Josef Bacik's avatar
      Btrfs: make sure roots are assigned before freeing their nodes · 655b09fe
      Josef Bacik authored
      If we fail to load the chunk tree we'll call free_root_pointers, except we may
      not have assigned the roots for the dev_root/extent_root/csum_root yet, so we
      could NULL pointer deref at this point.  Just add checks to make sure these
      roots are set to keep us from panicing.  Thanks,
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      655b09fe
    • Stefan Behrens's avatar
      Btrfs: explicitly use global_block_rsv for quota_tree · 3a6cad90
      Stefan Behrens authored
      The quota_tree was set up to use the empty_block_rsv before
      which would be problematic when the filesystem is filled up
      and ENOSPC happens during internal operations while the quota
      tree is updated and COWed (when the btrfs_qgroup_info_item
      items) are written. In fact, use_block_rsv() which is used
      in btrfs_cow_block() falls back to the global_block_rsv in
      this case. But just in order to make it more clear what is
      happening, change it to explicitly use the global_block_rsv.
      Signed-off-by: default avatarStefan Behrens <sbehrens@giantdisaster.de>
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      3a6cad90
    • Alexandre Oliva's avatar
      btrfs: do away with non-whole_page extent I/O · 17a5adcc
      Alexandre Oliva authored
      end_bio_extent_readpage computes whole_page based on bv_offset and
      bv_len, without taking into account that blk_update_request may modify
      them when some of the blocks to be read into a page produce a read
      error.  This would cause the read to unlock only part of the file
      range associated with the page, which would in turn leave the entire
      page locked, which would not only keep the process blocked instead of
      returning -EIO to it, but also prevent any further access to the file.
      
      It turns out that btrfs always issues whole-page reads and writes.
      The special handling of non-whole_page appears to be a mistake or a
      left-over from a time when this wasn't the case.  Indeed,
      end_bio_extent_writepage distinguished between whole_page and
      non-whole_page writes but behaved identically in both cases!
      
      I've replaced the whole_page computations with warnings, just to be
      sure that we're not issuing partial page reads or writes.  The
      warnings should probably just go away some time.
      Signed-off-by: default avatarAlexandre Oliva <oliva@gnu.org>
      Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
      17a5adcc