remarkable-linux/fs
Guangyu Sun 93fd63c2f0 Btrfs: dir_inode_operations should use btrfs_update_time also
Commit 2bc5565286 (Btrfs: don't update atime on
RO subvolumes) ensures that the access time of an inode is not updated when
the inode lives in a read-only subvolume.
However, if a directory on a read-only subvolume is accessed, the atime is
updated. This results in a write operation to a read-only subvolume. I
believe that access times should never be updated on read-only subvolumes.

To reproduce:

 # mkfs.btrfs -f /dev/dm-3
 (...)
 # mount /dev/dm-3 /mnt
 # btrfs subvol create /mnt/sub
 	Create subvolume '/mnt/sub'
 # mkdir /mnt/sub/dir
 # echo "abc" > /mnt/sub/dir/file
 # btrfs subvol snapshot -r /mnt/sub /mnt/rosnap
 	Create a readonly snapshot of '/mnt/sub' in '/mnt/rosnap'
 # stat /mnt/rosnap/dir
 	File: `/mnt/rosnap/dir'
 	Size: 8         Blocks: 0          IO Block: 4096   directory
 Device: 16h/22d    Inode: 257         Links: 1
 Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
 	Access: 2013-09-11 07:21:49.389157126 -0400
 	Modify: 2013-09-11 07:22:02.330156079 -0400
 	Change: 2013-09-11 07:22:02.330156079 -0400
 # ls /mnt/rosnap/dir
 	file
 # stat /mnt/rosnap/dir
 	File: `/mnt/rosnap/dir'
 	Size: 8         Blocks: 0          IO Block: 4096   directory
 Device: 16h/22d    Inode: 257         Links: 1
 Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
 	Access: 2013-09-11 07:22:56.797151670 -0400
 	Modify: 2013-09-11 07:22:02.330156079 -0400
 	Change: 2013-09-11 07:22:02.330156079 -0400

Reported-by: Koen De Wit <koen.de.wit@oracle.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
2013-09-21 11:05:30 -04:00
..
9p
adfs
affs
afs
autofs4
befs
bfs bfs: iget_locked() doesn't return an ERR_PTR 2013-08-24 12:10:22 -04:00
btrfs Btrfs: dir_inode_operations should use btrfs_update_time also 2013-09-21 11:05:30 -04:00
cachefiles
ceph
cifs
coda
configfs
cramfs
debugfs
devpts
dlm dlm: kill the unnecessary and wrong device_close()->recalc_sigpending() 2013-08-09 10:48:20 -07:00
ecryptfs
efivarfs
efs efs: iget_locked() doesn't return an ERR_PTR() 2013-08-24 12:10:22 -04:00
exofs
exportfs
ext2
ext3
ext4 jbd2: Fix oops in jbd2_journal_file_inode() 2013-08-16 21:19:41 -04:00
f2fs
fat
freevxfs
fscache
fuse
gfs2 GFS2: Check for glock already held in gfs2_getxattr 2013-08-19 09:33:57 +01:00
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs cope with potentially long ->d_dname() output for shmem/hugetlb 2013-08-24 12:10:17 -04:00
isofs
jbd
jbd2
jffs2
jfs jfs: fix readdir cookie incompatibility with NFSv4 2013-08-15 17:22:29 -05:00
lockd
logfs
minix
ncpfs
nfs
nfs_common
nfsd
nilfs2 nilfs2: fix issue with counting number of bio requests for BIO_EOPNOTSUPP error detection 2013-08-23 09:51:22 -07:00
nls
notify
ntfs
ocfs2 fs/ocfs2/super.c: Use bigger nodestr to accomodate 32-bit node numbers 2013-08-28 19:26:38 -07:00
omfs
openpromfs
proc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-08-25 12:25:38 -07:00
pstore
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
ubifs
udf
ufs
xfs
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c [SCSI] sg: Fix user memory corruption when SG_IO is interrupted by a signal 2013-08-21 10:58:35 -07:00
block_dev.c
buffer.c
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c
coredump.c
coredump.h
dcache.c vfs: make the dentry cache use the lockref infrastructure 2013-08-28 18:24:59 -07:00
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c Fix TLB gather virtual address range invalidation corner cases 2013-08-16 08:52:46 -07:00
fcntl.c
fhandle.c
file.c
file_table.c
filesystems.c
fs-writeback.c
fs_struct.c
generic_acl.c
inode.c
internal.h
ioctl.c
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c
mount.h
mpage.c
namei.c vfs: make the dentry cache use the lockref infrastructure 2013-08-28 18:24:59 -07:00
namespace.c VFS: collect_mounts() should return an ERR_PTR 2013-08-24 12:10:29 -04:00
no-block.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c
sync.c
timerfd.c
utimes.c
xattr.c
xattr_acl.c