linux-next: manual merge of the block tree with the vfs-brauner tree
Subsystems (2)
Mark Brown
maintainerHi all,
Today's linux-next merge of the block tree got a conflict in:
fs/stat.c
between commit:
0ef625bba6fb2 ("vfs: support statx(..., NULL, AT_EMPTY_PATH, ...)")
from the vfs-brauner tree and commit:
0f9ca80fa4f96 ("fs: Add initial atomic write support info to statx") 9abcfbd235f59 ("block: Add atomic write support for statx")
from the block tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
fs/stat.c +0 -0
@@@ -214,43 -245,6 +245,45 @@@ int getname_statx_lookup_flags(int flagreturn lookup_flags; } +static int vfs_statx_path(struct path *path, int flags, struct kstat *stat, + u32 request_mask) +{ + int error = vfs_getattr(path, stat, request_mask, flags); ++ struct inode *backing_inode; + + if (request_mask & STATX_MNT_ID_UNIQUE) { + stat->mnt_id =real_mount (path->mnt)->mnt_id_unique; + stat->result_mask |=STATX_MNT_ID_UNIQUE ; + } else { + stat->mnt_id =real_mount (path->mnt)->mnt_id; + stat->result_mask |=STATX_MNT_ID ; + } + + if (path_mounted(path)) + stat->attributes |=STATX_ATTR_MOUNT_ROOT ; + stat->attributes_mask |=STATX_ATTR_MOUNT_ROOT ; + -/* Handle STATX_DIOALIGN for block devices. */ - if (request_mask & STATX_DIOALIGN) { -struct inode *inode =d_backing_inode (path->dentry); - -if (S_ISBLK (inode->i_mode)) -bdev_statx_dioalign (inode, stat); - } ++/* ++ * If this is a block device inode, override the filesystem ++ * attributes with the block device specific parameters that need to be ++ * obtained from the bdev backing inode. ++ */ ++ backing_inode =d_backing_inode (path->dentry); ++ if (S_ISBLK(backing_inode->i_mode)) ++bdev_statx (backing_inode, stat, request_mask); + + return error; +} + +static int vfs_statx_fd(int fd, int flags, struct kstat *stat, + u32 request_mask) +{ +CLASS (fd_raw, f)(fd); + if (!f.file) + return -EBADF ; + return vfs_statx_path(&f.file->f_path, flags, stat, request_mask); +} +/** * vfs_statx - Get basic and extra attributes by filename * @dfd: A file descriptor representing the base dir for a relative filename
Christian Brauner
maintainerQuoted 8 lines · Mark Brown
Hi all,
Today's linux-next merge of the block tree got a conflict in:
fs/stat.cbetween commit:
Quoted 8 lines
0ef625bba6fb2("vfs: supportstatx(..., NULL, AT_EMPTY_PATH, ...)")from the vfs-brauner tree and commit:
0f9ca80fa4f96("fs: Add initial atomic write support info to statx")9abcfbd235f59("block: Add atomic write support for statx")from the block tree.
Jens,
Can you give me the fs bits and I'll put them in a shared branch we can both pull in?
Quoted 65 lines
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
fs/stat.c +9
-7@@@ -214,43 -245,6 +245,45 @@@ int getname_statx_lookup_flags(int flagreturn lookup_flags; } +static int vfs_statx_path(struct path *path, int flags, struct kstat *stat, + u32 request_mask) +{ + int error = vfs_getattr(path, stat, request_mask, flags); ++ struct inode *backing_inode; + + if (request_mask & STATX_MNT_ID_UNIQUE) { + stat->mnt_id =real_mount (path->mnt)->mnt_id_unique; + stat->result_mask |=STATX_MNT_ID_UNIQUE ; + } else { + stat->mnt_id =real_mount (path->mnt)->mnt_id; + stat->result_mask |=STATX_MNT_ID ; + } + + if (path_mounted(path)) + stat->attributes |=STATX_ATTR_MOUNT_ROOT ; + stat->attributes_mask |=STATX_ATTR_MOUNT_ROOT ; + -/* Handle STATX_DIOALIGN for block devices. */ - if (request_mask & STATX_DIOALIGN) { -struct inode *inode =d_backing_inode (path->dentry); - -if (S_ISBLK (inode->i_mode)) -bdev_statx_dioalign (inode, stat); - } ++/* ++ * If this is a block device inode, override the filesystem ++ * attributes with the block device specific parameters that need to be ++ * obtained from the bdev backing inode. ++ */ ++ backing_inode =d_backing_inode (path->dentry); ++ if (S_ISBLK(backing_inode->i_mode)) ++bdev_statx (backing_inode, stat, request_mask); + + return error; +} + +static int vfs_statx_fd(int fd, int flags, struct kstat *stat, + u32 request_mask) +{ +CLASS (fd_raw, f)(fd); + if (!f.file) + return -EBADF ; + return vfs_statx_path(&f.file->f_path, flags, stat, request_mask); +} +/** * vfs_statx - Get basic and extra attributes by filename * @dfd: A file descriptor representing the base dir for a relative filename
Quoted 16 lines · Christian Brauner
Quoted 15 lines · Mark Brown
Hi all,
Today's linux-next merge of the block tree got a conflict in:
fs/stat.cbetween commit:
0ef625bba6fb2("vfs: supportstatx(..., NULL, AT_EMPTY_PATH, ...)")from the vfs-brauner tree and commit:
0f9ca80fa4f96("fs: Add initial atomic write support info to statx")9abcfbd235f59("block: Add atomic write support for statx")
Quoted 6 lines
Quoted 1 line
from the block tree.
Jens,
Can you give me the fs bits and I'll put them in a shared branch we can both pull in?
It's pretty far down in my tree at this point, so I think we'll just have to live with this conflict. At least it's not a complicated one to resolve.
Signature · 1 line
Jens Axboe