1. 19 4月, 2012 2 次提交
  2. 13 4月, 2012 1 次提交
  3. 29 3月, 2012 1 次提交
    • C
      Btrfs: flush out and clean up any block device pages during mount · 3c4bb26b
      Chris Mason 提交于
      Btrfs puts the filesystem metadata into its own address space, and
      somehow the block device address space isn't getting onto disk properly
      before a mount.  The end result is that a loop of mkfs and mounting the
      filesystem will sometimes find stale or incorrect data.
      
      This commit should fix it by sprinkling fdatawrites and invalidate_bdev
      calls around.  This is a short term measure to make sure it is fixed.
      The block devices really should be flushed and cleaned up higher in the
      stack.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      3c4bb26b
  4. 27 3月, 2012 7 次提交
  5. 22 3月, 2012 6 次提交
  6. 23 2月, 2012 1 次提交
    • C
      Btrfs: make sure we update latest_bdev · a6b0d5c8
      Chris Mason 提交于
      When we are setting up the mount, we close all the
      devices that were not actually part of the metadata we found.
      
      But, we don't make sure that one of those devices wasn't
      fs_devices->latest_bdev, which means we can do a use after free
      on the one we closed.
      
      This updates latest_bdev as it goes.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      a6b0d5c8
  7. 17 2月, 2012 1 次提交
  8. 15 2月, 2012 1 次提交
    • D
      btrfs: silence warning in raid array setup · 8a334426
      David Sterba 提交于
      Raid array setup code creates an extent buffer in an usual way. When the
      PAGE_CACHE_SIZE is > super block size, the extent pages are not marked
      up-to-date, which triggers a WARN_ON in the following
      write_extent_buffer call. Add an explicit up-to-date call to silence the
      warning.
      Signed-off-by: NDavid Sterba <dsterba@suse.cz>
      8a334426
  9. 17 1月, 2012 18 次提交
  10. 11 1月, 2012 2 次提交
    • L
      Btrfs: fix possible deadlock when opening a seed device · b367e47f
      Li Zefan 提交于
      The correct lock order is uuid_mutex -> volume_mutex -> chunk_mutex,
      but when we mount a filesystem which has backing seed devices, we have
      this lock chain:
      
          open_ctree()
              lock(chunk_mutex);
              read_chunk_tree();
                  read_one_dev();
                      open_seed_devices();
                          lock(uuid_mutex);
      
      and then we hit a lockdep splat.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      b367e47f
    • L
      Btrfs: simplfy calculation of stripe length for discard operation · ec9ef7a1
      Li Zefan 提交于
      For btrfs raid, while discarding a range of space, we'll need to know
      the start offset and length to discard for each device, and it's done
      in btrfs_map_block().
      
      However the calculation is a bit complex for raid0 and raid10, so I
      reimplement it based on a fact that:
      
              dev1          dev2           dev3    (raid0)
              -----------------------------------
              s0 s3 s6      s1 s4 s7       s2 s5
      
      Each device has (total_stripes / nr_dev) stripes, or plus one.
      Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
      ec9ef7a1