1. 28 2月, 2017 13 次提交
  2. 17 2月, 2017 4 次提交
  3. 14 2月, 2017 4 次提交
  4. 10 12月, 2016 1 次提交
    • C
      fs: try to clone files first in vfs_copy_file_range · a76b5b04
      Christoph Hellwig 提交于
      A clone is a perfectly fine implementation of a file copy, so most
      file systems just implement the copy that way.  Instead of duplicating
      this logic move it to the VFS.  Currently btrfs and XFS implement copies
      the same way as clones and there is no behavior change for them, cifs
      only implements clones and grow support for copy_file_range with this
      patch.  NFS implements both, so this will allow copy_file_range to work
      on servers that only implement CLONE and be lot more efficient on servers
      that implements CLONE and COPY.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      a76b5b04
  5. 09 12月, 2016 1 次提交
  6. 06 12月, 2016 8 次提交
  7. 30 11月, 2016 4 次提交
  8. 29 11月, 2016 1 次提交
  9. 04 10月, 2016 1 次提交
    • O
      Btrfs: catch invalid free space trees · 6675df31
      Omar Sandoval 提交于
      There are two separate issues that can lead to corrupted free space
      trees.
      
      1. The free space tree bitmaps had an endianness issue on big-endian
         systems which is fixed by an earlier patch in this series.
      2. btrfs-progs before v4.7.3 modified filesystems without updating the
         free space tree.
      
      To catch both of these issues at once, we need to force the free space
      tree to be rebuilt. To do so, add a FREE_SPACE_TREE_VALID compat_ro bit.
      If the bit isn't set, we know that it was either produced by a broken
      big-endian kernel or may have been corrupted by btrfs-progs.
      
      This also provides us with a way to add rudimentary read-write support
      for the free space tree to btrfs-progs: it can just clear this bit and
      have the kernel rebuild the free space tree.
      
      Cc: stable@vger.kernel.org # 4.5+
      Tested-by: NHolger Hoffstätte <holger@applied-asynchrony.com>
      Tested-by: NChandan Rajendra <chandan@linux.vnet.ibm.com>
      Signed-off-by: NOmar Sandoval <osandov@fb.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      6675df31
  10. 27 9月, 2016 3 次提交
    • A
      btrfs: fix btrfs_no_printk stub helper · 2fd57fcb
      Arnd Bergmann 提交于
      The addition of btrfs_no_printk() caused a build failure when
      CONFIG_PRINTK is disabled:
      
      fs/btrfs/send.c: In function 'send_rename':
      fs/btrfs/ctree.h:3367:2: error: implicit declaration of function 'btrfs_no_printk' [-Werror=implicit-function-declaration]
      
      This moves the helper outside of that #ifdef so it is always
      defined, and changes the existing #ifdef to refer to that
      helper as well for consistency.
      
      Fixes: 47c57058ff2c ("btrfs: btrfs_debug should consume fs_info when DEBUG is not defined")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NDavid Sterba <dsterba@suse.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      2fd57fcb
    • L
      Btrfs: memset to avoid stale content in btree leaf · 851cd173
      Liu Bo 提交于
      This is an additional patch to
      "Btrfs: memset to avoid stale content in btree node block".
      
      This uses memset to initialize the unused space in a leaf to avoid
      potential stale content, which may be incurred by pushing items
      between sibling leaves.
      Signed-off-by: NLiu Bo <bo.li.liu@oracle.com>
      Reviewed-by: NDavid Sterba <dsterba@suse.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      851cd173
    • J
      btrfs: btrfs_debug should consume fs_info when DEBUG is not defined · c01f5f96
      Jeff Mahoney 提交于
      We can hit unused variable warnings when btrfs_debug and friends are
      just aliases for no_printk.  This is due to the fs_info not getting
      consumed by the function call, which can happen if convenenience
      variables are used.  This patch adds a new btrfs_no_printk static inline
      that consumes the convenience variable and does nothing else.  It
      silences the unused variable warning and has no impact on the generated
      code:
      
      $ size fs/btrfs/extent_io.o*
         text	   data	    bss	    dec	    hex	filename
        44072	    152	     32	  44256	   ace0	fs/btrfs/extent_io.o.btrfs_no_printk
        44072	    152	     32	  44256	   ace0	fs/btrfs/extent_io.o.no_printk
      
      Fixes: 27a0dd61 (Btrfs: make btrfs_debug match pr_debug handling related to DEBUG)
      Signed-off-by: NJeff Mahoney <jeffm@suse.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      c01f5f96