kernel_optimize_test/fs
Li Zefan 0e7b824c4e Btrfs: don't make a file partly checksummed through file clone
To reproduce the bug:

  # mount /dev/sda7 /mnt
  # dd if=/dev/zero of=/mnt/src bs=4K count=1
  # umount /mnt

  # mount -o nodatasum /dev/sda7 /mnt
  # dd if=/dev/zero of=/mnt/dst bs=4K count=1
  # clone_range -s 4K -l 4K /mnt/src /mnt/dst

  # echo 3 > /proc/sys/vm/drop_caches
  # cat /mnt/dst
  # dmesg
  ...
  btrfs no csum found for inode 258 start 0
  btrfs csum failed ino 258 off 0 csum 2566472073 private 0

It's because part of the file is checksummed and the other part is not,
and then btrfs will complain checksum is not found when we read the file.

Disallow file clone if src and dst file have different checksum flag,
so we ensure a file is completely checksummed or unchecksummed.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
2011-09-18 10:20:46 -04:00
..
9p
adfs
affs
afs AFS: Use i_generation not i_version for the vnode uniquifier 2011-06-16 11:44:48 -04:00
autofs4
befs
bfs
btrfs Btrfs: don't make a file partly checksummed through file clone 2011-09-18 10:20:46 -04:00
cachefiles
ceph ceph analog of cifs build_path_from_dentry() race fix 2011-07-16 23:43:58 -04:00
cifs CIFS: Fix wrong length in cifs_iovec_read 2011-07-21 00:48:05 +00:00
coda coda_ioctl_permission() is safe in RCU mode 2011-06-20 10:44:19 -04:00
configfs
cramfs cramfs: get_cramfs_inode() returns ERR_PTR() on failure 2011-07-17 23:22:02 -04:00
debugfs
devpts
dlm
ecryptfs
efs
exofs fix exofs ->get_parent() 2011-07-17 23:20:29 -04:00
exportfs
ext2
ext3
ext4
fat
freevxfs
fscache FS-Cache: Fix __fscache_uncache_all_inode_pages()'s outer loop 2011-07-21 10:59:16 -07:00
fuse
gfs2 GFS2: Resolve inode eviction and ail list interaction bug 2011-07-14 08:59:44 +01:00
hfs
hfsplus hfsplus: Fix double iput of the same inode in hfsplus_fill_super() 2011-06-30 13:38:39 +02:00
hostfs
hpfs
hppfs hppfs_lookup(): don't open-code lookup_one_len() 2011-07-17 23:22:48 -04:00
hugetlbfs
isofs isofs: fix bh leak in isofs_fill_super() error case 2011-06-18 07:25:42 -07:00
jbd
jbd2
jffs2
jfs jfs: agstart field must be 64 bits 2011-06-20 17:53:24 -05:00
lockd NLM: Don't hang forever on NLM unlock requests 2011-06-15 11:24:27 -04:00
logfs logfs doesn't need ->permission() at all 2011-06-20 10:44:26 -04:00
minix
ncpfs
nfs Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6 2011-07-13 14:34:08 -07:00
nfs_common
nfsd nfsd4: fix break_lease flags on nfsd open 2011-06-20 10:38:01 -04:00
nilfs2 nilfs2_permission() doesn't need to bail out in RCU mode 2011-06-20 10:44:33 -04:00
nls
notify
ntfs
ocfs2
omfs Remove unneeded version.h includes from fs/ 2011-06-24 08:34:22 -07:00
openpromfs
partitions
proc proc: restrict access to /proc/PID/io 2011-06-28 09:39:11 -07:00
pstore
qnx4
quota
ramfs
reiserfs reiserfs_permission() doesn't need to bail out in RCU mode 2011-06-20 10:45:21 -04:00
romfs romfs: fix romfs_get_unmapped_area() argument check 2011-06-27 18:00:12 -07:00
squashfs
sysfs
sysv
ubifs ubifs: dereferencing an ERR_PTR in ubifs_mount() 2011-06-20 10:42:34 -04:00
udf
ufs ufs should use d_splice_alias() 2011-07-17 23:21:35 -04:00
xfs xfs: unpin stale inodes directly in IOP_COMMITTED 2011-07-06 15:44:40 -05:00
aio.c
anon_inodes.c
attr.c
bad_inode.c bad_inode_permission() is safe from RCU mode 2011-06-20 10:44:00 -04:00
binfmt_aout.c
binfmt_elf_fdpic.c FDPIC: Fix memory leak 2011-07-06 12:15:16 -07:00
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c
block_dev.c
buffer.c vfs: Fix data corruption after failed write in __block_write_begin() 2011-06-16 11:44:46 -04:00
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c
compat.c
dcache.c vfs: drop conditional inode prefetch in __do_lookup_rcu 2011-07-21 11:01:42 -07:00
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c KEYS/DNS: Fix ____call_usermodehelper() to not lose the session keyring 2011-06-17 09:40:48 -07:00
fcntl.c
fhandle.c
fifo.c
file_table.c
file.c
filesystems.c
fs_struct.c
fs-writeback.c
generic_acl.c
inode.c mm: fix assertion mapping->nrpages == 0 in end_writeback() 2011-06-27 18:00:13 -07:00
internal.h
ioctl.c
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c fs/libfs.c: fix simple_attr_write() on 32bit machines 2011-07-19 22:09:30 -07:00
locks.c fs: fix lock initialization 2011-07-06 10:41:13 -07:00
Makefile
mbcache.c
mpage.c
namei.c vfs: fix race in rcu lookup of pruned dentry 2011-07-19 21:49:01 -07:00
namespace.c
nfsctl.c
no-block.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
read_write.c
read_write.h
readdir.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c
sync.c
timerfd.c timerfd: Fix wakeup of processes when timer is cancelled on clock change 2011-06-14 11:46:14 +02:00
utimes.c
xattr_acl.c
xattr.c