linux-stable/fs/btrfs
Josef Bacik a5874ce6ce Btrfs: check roots last log commit when checking if an inode has been logged
Liu introduced a local copy of the last log commit for an inode to make sure we
actually log an inode even if a log commit has already taken place.  In order to
make sure we didn't relog the same inode multiple times he set this local copy
to the current trans when we log the inode, because usually we log the inode and
then sync the log.  The exception to this is during rename, we will relog an
inode if the name changed and it is already in the log.  The problem with this
is then we go to sync the inode, and our check to see if the inode has already
been logged is tripped and we don't sync the log.  To fix this we need to _also_
check against the roots last log commit, because it could be less than what is
in our local copy of the log commit.  This fixes a bug where we rename a file
into a directory and then fsync the directory and then on remount the directory
is no longer there.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-21 11:05:24 -04:00
..
tests Btrfs: separate out tests into their own directory 2013-09-01 08:15:38 -04:00
acl.c Btrfs: skip adding an acl attribute if we don't have to 2012-12-16 20:46:15 -05:00
async-thread.c Btrfs: call the ordered free operation without any locks held 2012-07-25 16:15:07 -04:00
async-thread.h
backref.c Btrfs: allocate prelim_ref with a slab allocater 2013-09-01 08:16:27 -04:00
backref.h Btrfs: allocate prelim_ref with a slab allocater 2013-09-01 08:16:27 -04:00
btrfs_inode.h Btrfs: check roots last log commit when checking if an inode has been logged 2013-09-21 11:05:24 -04:00
check-integrity.c Btrfs: Use %z to format size_t 2013-09-01 08:16:19 -04:00
check-integrity.h
compat.h
compression.c Btrfs: Remove superfluous casts from u64 to unsigned long long 2013-09-01 08:16:08 -04:00
compression.h btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
ctree.c Btrfs: fixup error handling in btrfs_reloc_cow 2013-09-21 10:58:54 -04:00
ctree.h Btrfs: fixup error handling in btrfs_reloc_cow 2013-09-21 10:58:54 -04:00
delayed-inode.c Btrfs: fix printing of non NULL terminated string 2013-09-01 08:16:20 -04:00
delayed-inode.h [readdir] convert btrfs 2013-06-29 12:57:00 +04:00
delayed-ref.c Btrfs: get rid of sparse warnings 2013-09-01 08:15:50 -04:00
delayed-ref.h Btrfs: handle running extent ops with skinny metadata 2013-05-17 21:40:15 -04:00
dev-replace.c Btrfs: Make BTRFS_DEV_REPLACE_DEVID an unsigned long long constant 2013-09-01 08:16:09 -04:00
dev-replace.h Btrfs: add new sources for device replace code 2012-12-12 17:15:41 -05:00
dir-item.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
disk-io.c btrfs: add lockdep and tracing annotations for uuid tree 2013-09-21 10:58:56 -04: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-tree.c Btrfs: allocate the free space by the existed max extent size when ENOSPC 2013-09-21 11:05:23 -04:00
extent_io.c Btrfs: actually limit the size of delalloc range 2013-09-21 11:05:24 -04:00
extent_io.h btrfs: mark some local function as 'static' 2013-09-01 08:15:51 -04:00
extent_map.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
extent_map.h Btrfs: fix bad extent logging 2013-05-06 15:54:34 -04:00
file-item.c Btrfs: Remove superfluous casts from u64 to unsigned long long 2013-09-01 08:16:08 -04:00
file.c Btrf: cleanup: don't check for root_refs == 0 twice 2013-09-01 08:16:29 -04:00
free-space-cache.c Btrfs: allocate the free space by the existed max extent size when ENOSPC 2013-09-21 11:05:23 -04:00
free-space-cache.h Btrfs: allocate the free space by the existed max extent size when ENOSPC 2013-09-21 11:05:23 -04:00
hash.h btrfs: extended inode refs 2012-10-09 09:14:45 -04:00
inode-item.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
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: more efficient inode tree replace operation 2013-09-21 10:58:55 -04:00
ioctl.c btrfs: return btrfs error code for dev excl ops err 2013-09-01 08:16:35 -04:00
Kconfig Btrfs: add support for asserts 2013-09-01 08:16:32 -04:00
locking.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
locking.h Btrfs: remove btrfs_try_spin_lock 2013-03-14 14:57:10 -04:00
lzo.c Btrfs: return -1 when lzo compression makes data bigger 2013-09-01 07:57:19 -04:00
Makefile Btrfs: introduce a tree for items that map UUIDs to something 2013-09-01 08:15:52 -04:00
math.h Btrfs: cleanup duplicated division functions 2012-12-11 13:31:30 -05:00
ordered-data.c Btrfs: allow partial ordered extent completion 2013-09-01 08:16:34 -04:00
ordered-data.h Btrfs: allow partial ordered extent completion 2013-09-01 08:16:34 -04:00
orphan.c
print-tree.c Btrfs: Remove superfluous casts from u64 to unsigned long long 2013-09-01 08:16:08 -04:00
print-tree.h btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
qgroup.c Btrfs: Remove superfluous casts from u64 to unsigned long long 2013-09-01 08:16:08 -04:00
raid56.c Btrfs, raid56: fix memory leak when allocating pages for p/q stripes failed 2013-09-01 08:04:27 -04:00
raid56.h Btrfs: RAID5 and RAID6 2013-02-01 14:24:23 -05:00
rcu-string.h
reada.c Btrfs: fix reada debug code compilation 2013-05-06 15:54:55 -04:00
relocation.c Btrfs: fixup error handling in btrfs_reloc_cow 2013-09-21 10:58:54 -04:00
root-tree.c Btrfs: Remove superfluous casts from u64 to unsigned long long 2013-09-01 08:16:08 -04:00
scrub.c Btrf: cleanup: don't check for root_refs == 0 twice 2013-09-01 08:16:29 -04:00
send.c btrfs: reuse kbasename helper 2013-09-01 08:16:36 -04:00
send.h btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
struct-funcs.c
super.c btrfs: show compiled-in config features at module load time 2013-09-21 10:58:56 -04:00
sysfs.c btrfs: fixup/remove module.h usage as required 2013-03-01 15:01:01 -05:00
transaction.c Btrfs: Remove superfluous casts from u64 to unsigned long long 2013-09-01 08:16:08 -04:00
transaction.h btrfs: mark some local function as 'static' 2013-09-01 08:15:51 -04:00
tree-defrag.c btrfs: remove cache only arguments from defrag path 2013-02-20 12:59:36 -05:00
tree-log.c Btrfs: actually log directory we are fsync()'ing 2013-09-21 11:05:24 -04:00
tree-log.h btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
ulist.c Btrfs: fix crash regarding to ulist_add_merge 2013-07-02 11:50:59 -04:00
ulist.h Btrfs: add a rb_tree to improve performance of ulist search 2013-05-06 15:54:44 -04:00
uuid-tree.c Btrfs: check UUID tree during mount if required 2013-09-01 08:15:58 -04:00
volumes.c Btrfs: do not add replace target to the alloc_list 2013-09-21 10:58:55 -04:00
volumes.h Btrfs: add btrfs_alloc_device and switch to it 2013-09-01 08:16:04 -04:00
xattr.c btrfs: make static code static & remove dead code 2013-05-06 15:55:23 -04:00
xattr.h
zlib.c btrfs: fix message printing 2012-10-09 09:19:57 -04:00