linux/fs/btrfs
Zach Brown db62efbbf8 btrfs: don't loop on large offsets in readdir
When btrfs readdir() hits the last entry it sets the readdir offset to a
huge value to stop buggy apps from breaking when the same name is
returned by readdir() with concurrent rename()s.

But unconditionally setting the offset to INT_MAX causes readdir() to
loop returning any entries with offsets past INT_MAX.  It only takes a
few hours of constant file creation and removal to create entries past
INT_MAX.

So let's set the huge offset to LLONG_MAX if the last entry has already
overflowed 32bit loff_t.   Without large offsets behaviour is identical.
With large offsets 64bit apps will work and 32bit apps will be no more
broken than they currently are if they see large offsets.

Signed-off-by: Zach Brown <zab@redhat.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-08-09 19:34:56 -04:00
..
acl.c
async-thread.c
async-thread.h
backref.c Btrfs: make sure the backref walker catches all refs to our extent 2013-08-09 19:30:03 -04:00
backref.h Btrfs: cleanup backref search commit root flag stuff 2013-07-01 08:52:29 -04:00
btrfs_inode.h
check-integrity.c Btrfs: use a btrfs bioset instead of abusing bio internals 2013-05-17 21:52:52 -04:00
check-integrity.h
compat.h
compression.c
compression.h
ctree.c Btrfs: fix extent buffer leak after backref walking 2013-08-09 19:29:42 -04:00
ctree.h Btrfs: check if we can nocow if we don't have data space 2013-07-02 11:50:45 -04:00
delayed-inode.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2013-07-09 12:33:09 -07:00
delayed-inode.h [readdir] convert btrfs 2013-06-29 12:57:00 +04:00
delayed-ref.c
delayed-ref.h Btrfs: handle running extent ops with skinny metadata 2013-05-17 21:40:15 -04:00
dev-replace.c Btrfs: introduce per-subvolume ordered extent list 2013-06-14 11:29:41 -04:00
dev-replace.h
dir-item.c
disk-io.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2013-07-09 12:33:09 -07:00
disk-io.h Btrfs: introduce grab/put functions for the root of the fs/file tree 2013-06-14 11:29:38 -04:00
export.c Btrfs: cleanup: don't check the same thing twice 2013-06-14 11:29:30 -04:00
export.h
extent_io.c Btrfs: do not offset physical if we're compressed 2013-08-09 19:29:50 -04:00
extent_io.h Btrfs: check if we can nocow if we don't have data space 2013-07-02 11:50:45 -04:00
extent_map.c
extent_map.h
extent-tree.c Btrfs: re-add root to dead root list if we stop dropping it 2013-07-19 15:07:19 -04:00
file-item.c Btrfs: remove btrfs_sector_sum structure 2013-07-02 11:50:47 -04:00
file.c Btrfs: allow splitting of hole em's when dropping extent cache 2013-08-09 19:30:09 -04:00
free-space-cache.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2013-07-09 12:33:09 -07:00
free-space-cache.h btrfs: move ifdef around sanity checks out of init_btrfs_fs 2013-06-14 11:29:18 -04:00
hash.h
inode-item.c
inode-map.c Btrfs: don't use global block reservation for inode cache truncation 2013-05-17 21:40:22 -04:00
inode-map.h
inode.c btrfs: don't loop on large offsets in readdir 2013-08-09 19:34:56 -04:00
ioctl.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2013-07-09 12:33:09 -07:00
Kconfig
locking.c
locking.h
lzo.c btrfs: fix the code comments for LZO compression workspace 2013-07-01 08:52:26 -04:00
Makefile
math.h
ordered-data.c Btrfs: remove btrfs_sector_sum structure 2013-07-02 11:50:47 -04:00
ordered-data.h Btrfs: remove btrfs_sector_sum structure 2013-07-02 11:50:47 -04:00
orphan.c
print-tree.c
print-tree.h
qgroup.c Btrfs: fix qgroup rescan resume on mount 2013-06-14 11:30:10 -04:00
raid56.c Btrfs: use a btrfs bioset instead of abusing bio internals 2013-05-17 21:52:52 -04:00
raid56.h
rcu-string.h
reada.c
relocation.c Btrfs: remove btrfs_sector_sum structure 2013-07-02 11:50:47 -04:00
root-tree.c Btrfs: cleanup orphaned root orphan item 2013-07-02 11:50:52 -04:00
scrub.c Btrfs: fix wrong write offset when replacing a device 2013-07-19 15:07:26 -04:00
send.c Btrfs: Cocci spatch "memdup.spatch" 2013-06-14 11:30:12 -04:00
send.h
struct-funcs.c
super.c Btrfs: stop waiting on current trans if we aborted 2013-07-01 08:52:27 -04:00
sysfs.c
transaction.c Btrfs: check to see if root_list is empty before adding it to dead roots 2013-08-09 19:30:23 -04:00
transaction.h Btrfs: check to see if root_list is empty before adding it to dead roots 2013-08-09 19:30:23 -04:00
tree-defrag.c
tree-log.c Btrfs: release both paths before logging dir/changed extents 2013-08-09 19:30:16 -04:00
tree-log.h
ulist.c Btrfs: fix crash regarding to ulist_add_merge 2013-07-02 11:50:59 -04:00
ulist.h
volumes.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs 2013-07-09 12:33:09 -07:00
volumes.h Btrfs: make the chunk allocator completely tree lockless 2013-07-02 11:50:53 -04:00
xattr.c
xattr.h
zlib.c