linux/fs/btrfs
Li Zefan cbcc83265d Btrfs: fix defragmentation regression
There's an off-by-one bug:

  # create a file with lots of 4K file extents
  # btrfs fi defrag /mnt/file
  # sync
  # filefrag -v /mnt/file
  Filesystem type is: 9123683e
  File size of /mnt/file is 1228800 (300 blocks, blocksize 4096)
   ext logical physical expected length flags
     0       0     3372              64
     1      64     3136     3435      1
     2      65     3436     3136     64
     3     129     3201     3499      1
     4     130     3500     3201     64
     5     194     3266     3563      1
     6     195     3564     3266     64
     7     259     3331     3627      1
     8     260     3628     3331     40 eof

After this patch:

  ...
  # filefrag -v /mnt/file
  Filesystem type is: 9123683e
  File size of /mnt/file is 1228800 (300 blocks, blocksize 4096)
   ext logical physical expected length flags
     0       0     3372             300 eof
  /mnt/file: 1 extent found

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
2011-10-20 18:10:34 +02:00
..
Kconfig btrfs: Add lzo compression support 2010-12-22 23:15:47 +08:00
Makefile Btrfs: make acl functions really no-op if acl is not enabled 2011-08-01 14:30:48 -04:00
acl.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable 2011-08-02 21:14:05 -10:00
async-thread.c Btrfs: don't walk around with task->state != TASK_RUNNING 2010-05-25 10:34:58 -04:00
async-thread.h Btrfs: fix deadlock on async thread startup 2009-10-05 09:44:45 -04:00
btrfs_inode.h Btrfs: calculate checksum space correctly 2011-10-19 15:12:31 -04:00
compat.h Btrfs: drop remaining LINUX_KERNEL_VERSION checks and compat code 2009-01-06 09:38:55 -05:00
compression.c Btrfs: check the nodatasum flag when writing compressed files 2011-08-01 14:30:46 -04:00
compression.h btrfs: rename variables clashing with global function names 2011-05-02 13:57:19 +02:00
ctree.c Btrfs: remove lockdep magic from btrfs_next_leaf 2011-07-27 12:46:47 -04:00
ctree.h Btrfs: seperate out btrfs_block_rsv_check out into 2 different functions 2011-10-19 15:12:59 -04:00
delayed-inode.c Btrfs: switch the btrfs tree locks to reader/writer 2011-07-27 12:46:46 -04:00
delayed-inode.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
delayed-ref.c btrfs: remove old unused commented out code 2011-05-06 12:34:10 +02:00
delayed-ref.h btrfs: remove all unused functions 2011-05-06 12:34:03 +02:00
dir-item.c Btrfs: remove redundant code for dir item lookup 2011-08-01 14:30:48 -04:00
disk-io.c Btrfs: allow us to overcommit our enospc reservations 2011-10-19 15:12:50 -04:00
disk-io.h Btrfs: make a lockdep class for each root 2011-07-27 12:46:46 -04:00
export.c Merge branch 'ino-alloc' of git://repo.or.cz/linux-btrfs-devel into inode_numbers 2011-05-21 09:27:38 -04:00
export.h
extent-tree.c Btrfs: if we have a lot of pinned space, commit the transaction 2011-10-19 15:13:00 -04:00
extent_io.c Btrfs: introduce convert_extent_bit 2011-10-19 15:12:47 -04:00
extent_io.h Btrfs: stop using write_one_page 2011-10-19 15:12:48 -04:00
extent_map.c Btrfs: clean up code for merging extent maps 2011-08-01 14:30:50 -04:00
extent_map.h btrfs: drop gfp parameter from alloc_extent_map 2011-05-02 13:57:21 +02:00
file-item.c Btrfs: skip locking if searching the commit root in csum lookup 2011-09-11 10:52:24 -04:00
file.c Btrfs: use the inode's mapping mask for allocating pages 2011-10-19 15:12:45 -04:00
free-space-cache.c Btrfs: don't flush the cache inode before writing it 2011-10-19 15:13:01 -04:00
free-space-cache.h btrfs: remove all unused functions 2011-05-06 12:34:03 +02:00
hash.h Btrfs: remove crc32c.h and use libcrc32c directly. 2009-06-10 11:29:53 -04:00
inode-item.c Btrfs: BUG_ON is deleted from the caller of btrfs_truncate_item & btrfs_extend_item 2011-05-23 13:24:39 -04:00
inode-map.c Btrfs: handle enospc accounting for free space inodes 2011-10-19 15:12:42 -04:00
inode-map.h Btrfs: Support reading/writing on disk free ino cache 2011-04-25 16:46:11 +08:00
inode.c Btrfs: seperate out btrfs_block_rsv_check out into 2 different functions 2011-10-19 15:12:59 -04:00
ioctl.c Btrfs: fix defragmentation regression 2011-10-20 18:10:34 +02:00
ioctl.h Btrfs: add mount -o auto_defrag 2011-05-26 17:52:15 -04:00
locking.c Btrfs: switch the btrfs tree locks to reader/writer 2011-07-27 12:46:46 -04:00
locking.h Btrfs: switch the btrfs tree locks to reader/writer 2011-07-27 12:46:46 -04:00
lzo.c Btrfs: Avoid accessing unmapped kernel address 2011-02-16 15:37:58 -05:00
ordered-data.c Btrfs: add initial tracepoint support for btrfs 2011-03-28 05:37:33 -04:00
ordered-data.h btrfs: Allow to add new compression algorithm 2010-12-22 23:15:45 +08:00
orphan.c Btrfs: fixup return code for btrfs_del_orphan_item 2010-12-09 13:57:15 -05:00
print-tree.c btrfs: fix missing break in switch phrase 2011-01-28 16:40:37 -05:00
print-tree.h
relocation.c btrfs: check file extent backref offset underflow 2011-10-20 18:10:31 +02:00
root-tree.c btrfs: make btrfs_set_root_node void 2011-08-01 14:30:44 -04:00
scrub.c btrfs: remove unneeded includes from scrub.c 2011-06-10 14:59:52 +02:00
struct-funcs.c Btrfs: stop using highmem for extent_buffers 2011-07-27 12:46:45 -04:00
super.c Btrfs: introduce mount option no_space_cache 2011-10-19 15:12:51 -04:00
sysfs.c btrfs: Remove unused sysfs code 2011-06-17 14:54:18 -04:00
transaction.c Btrfs: seperate out btrfs_block_rsv_check out into 2 different functions 2011-10-19 15:12:59 -04:00
transaction.h Merge branch 'for-chris' of 2011-05-28 07:00:39 -04:00
tree-defrag.c btrfs: drop unused parameter from btrfs_release_path 2011-05-02 13:57:22 +02:00
tree-log.c Btrfs: fix an oops of log replay 2011-08-16 21:09:15 -04:00
tree-log.h btrfs: remove unused function prototypes 2011-05-04 14:01:26 +02:00
version.h
volumes.c Btrfs: allow us to overcommit our enospc reservations 2011-10-19 15:12:50 -04:00
volumes.h Btrfs: detect wether a device supports discard 2011-08-16 21:09:15 -04:00
xattr.c Btrfs: fix regression in re-setting a large xattr 2011-10-19 15:12:56 -04:00
xattr.h fs/vfs/security: pass last path component to LSM on inode creation 2011-02-01 11:12:29 -05:00
zlib.c zlib: slim down zlib_deflate() workspace when possible 2011-03-22 17:44:17 -07:00