Re: [PATCH 4/6 - REVISED] fuse: return correct dentry for ->mkdir

2025-03-05 Thread Christian Brauner
On Wed, Mar 05, 2025 at 08:48:20AM +1100, NeilBrown wrote: > > Subject: [PATCH] fuse: return correct dentry for ->mkdir > > fuse already uses d_splice_alias() to ensure an appropriate dentry is > found for a newly created dentry. Now that ->mkdir can return that > dentry we do so. > > This requ

Re: [PATCH 0/6 v2] Change ->mkdir() and vfs_mkdir() to return a dentry

2025-02-27 Thread Christian Brauner
On Thu, Feb 27, 2025 at 12:32:52PM +1100, NeilBrown wrote: > It is based on vfs/vfs-6.15.async.dir plus vfs/vfs-6.15.sysv: I dropped the > change to sysv as it seemed pointless preserving them. I added that change so there's no dependency between the vfs-6.15.sysv and vfs-6.15.async.dir branches.

Re: [PATCH 3/6] ceph: return the correct dentry on mkdir

2025-02-27 Thread Christian Brauner
On Thu, Feb 27, 2025 at 12:32:55PM +1100, NeilBrown wrote: > ceph already splices the correct dentry (in splice_dentry()) from the > result of mkdir but does nothing more with it. > > Now that ->mkdir can return a dentry, return the correct dentry. > > Note that previously ceph_mkdir() could call

Re: [PATCH 1/6] Change inode_operations.mkdir to return struct dentry *

2025-02-27 Thread Christian Brauner
On Thu, 27 Feb 2025 12:32:53 +1100, NeilBrown wrote: > Some filesystems, such as NFS, cifs, ceph, and fuse, do not have > complete control of sequencing on the actual filesystem (e.g. on a > different server) and may find that the inode created for a mkdir > request already exists in the icache an

Re: [linux-next:master] [fs] cdc4ad36a8: kernel_BUG_at_include/linux/page-flags.h

2024-08-07 Thread Christian Brauner
On Wed, Aug 07, 2024 at 04:46:15AM GMT, Matthew Wilcox wrote: > On Tue, Aug 06, 2024 at 10:26:17PM +0800, kernel test robot wrote: > > kernel test robot noticed "kernel_BUG_at_include/linux/page-flags.h" on: > > > > commit: cdc4ad36a871b7ac43fcc6b2891058d332ce60ce ("fs: Convert > > aops->write_be

Re: [PATCH] hostfs: fix the host directory parse when mounting.

2024-07-26 Thread Christian Brauner
On Thu, 25 Jul 2024 14:51:30 +0800, Hongbo Li wrote: > hostfs not keep the host directory when mounting. When the host > directory is none (default), fc->source is used as the host root > directory, and this is wrong. Here we use `parse_monolithic` to > handle the old mount path for parsing the roo

Re: [PATCH] hostfs: Add const qualifier to host_root in hostfs_fill_super()

2024-06-13 Thread Christian Brauner
On Tue, 11 Jun 2024 12:58:41 -0700, Nathan Chancellor wrote: > After the recent conversion to the new mount API, there is a warning > when building hostfs (which may be upgraded to an error via > CONFIG_WERROR=y): > > fs/hostfs/hostfs_kern.c: In function 'hostfs_fill_super': > fs/hostfs/hostfs

Re: [PATCH v2] hostfs: convert hostfs to use the new mount API

2024-06-03 Thread Christian Brauner
On Thu, 30 May 2024 20:01:11 +0800, Hongbo Li wrote: > Convert the hostfs filesystem to the new internal mount API as the old > one will be obsoleted and removed. This allows greater flexibility in > communication of mount parameters between userspace, the VFS and the > filesystem. > > See Docume

Re: [PATCH v2 00/89] fs: new accessor methods for inode atime and mtime

2023-10-17 Thread Christian Brauner
On Wed, Oct 04, 2023 at 02:52:21PM -0400, Jeff Layton wrote: > v2: > - bugfix in mtime handling > - incorporate _sec and _nsec accessor functions (Chuck Lever) > - move i_generation to plug hole after changing timestamps (Amir Goldstein) > > While working on the multigrain timestamp changes, Linus

Re: [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-29 Thread Christian Brauner
> It is a lot of churn though. I think that i_{a,c,m}time shouldn't be accessed directly by filesystems same as no filesystem should really access i_{g,u}id which we also provide i_{g,u}id_{read,write}() accessors for. The mode is another example where really most often should use helpers because

Re: [PATCH 87/87] fs: move i_blocks up a few places in struct inode

2023-09-29 Thread Christian Brauner
On Thu, Sep 28, 2023 at 10:41:34AM -0700, Linus Torvalds wrote: > On Thu, 28 Sept 2023 at 04:06, Jeff Layton wrote: > > > > Move i_blocks up above the i_lock, which moves the new 4 byte hole to > > just after the timestamps, without changing the size of the structure. > > I'm sure others have men

Re: [PATCH 01/79] fs: add ctime accessors infrastructure

2023-07-12 Thread Christian Brauner
On Wed, Jul 12, 2023 at 08:31:55AM -0700, Randy Dunlap wrote: > Hi Jeff, > > On arch/um/, (subarch i386 or x86_64), hostfs build fails with: > > ../fs/hostfs/hostfs_kern.c:520:36: error: incompatible type for arg > ument 2 of 'inode_set_ctime_to_ts' > ../include/linux/fs.h:1499:73: note: expected

Re: [PATCH 27/30] block: replace fmode_t with a block-specific type for block open flags

2023-06-08 Thread Christian Brauner
off_t lend); > +blk_mode_t file_to_blk_mode(struct file *file); > +int truncate_bdev_range(struct block_device *bdev, blk_mode_t mode, > + loff_t lstart, loff_t lend); > long blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg); > long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg); > > diff --git a/block/fops.c b/block/fops.c > index 9f26e25bafa172..086612103b9dd9 100644 > --- a/block/fops.c > +++ b/block/fops.c > @@ -470,6 +470,30 @@ static int blkdev_fsync(struct file *filp, loff_t start, > loff_t end, > return error; > } > > +blk_mode_t file_to_blk_mode(struct file *file) > +{ > + blk_mode_t mode = 0; > + > + if (file->f_mode & FMODE_READ) > + mode |= BLK_OPEN_READ; > + if (file->f_mode & FMODE_WRITE) > + mode |= BLK_OPEN_WRITE; > + if (file->f_mode & FMODE_EXCL) > + mode |= BLK_OPEN_EXCL; > + if (file->f_flags & O_NDELAY) > + mode |= BLK_OPEN_NDELAY; > + > + /* > + * If all bits in O_ACCMODE set (aka O_RDWR | O_WRONLY), the floppy > + * driver has historically allowed ioctls as if the file was opened for > + * writing, but does not allow and actual reads or writes. > + */ > + if ((file->f_flags & O_ACCMODE) == (O_RDWR | O_WRONLY)) > + mode |= BLK_OPEN_WRITE_IOCTL; Thanks for that! Reviewed-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [PATCH 28/31] block: replace fmode_t with a block-specific type for block open flags

2023-06-07 Thread Christian Brauner
On Wed, Jun 07, 2023 at 11:21:24AM +0200, Christian Brauner wrote: > On Tue, Jun 06, 2023 at 09:39:47AM +0200, Christoph Hellwig wrote: > > The only overlap between the block open flags mapped into the fmode_t and > > other uses of fmode_t are FMODE_READ and FMODE_WRITE. Define

Re: decouple block open flags from fmode_t

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 10:40:42AM +0200, Christoph Hellwig wrote: > On Tue, Jun 06, 2023 at 10:27:14AM +0200, Christian Brauner wrote: > > On Tue, Jun 06, 2023 at 09:39:19AM +0200, Christoph Hellwig wrote: > > > Hi all, > > > > > > this series adds a new blk

Re: [PATCH 31/31] fs: remove the now unused FMODE_* flags

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:50AM +0200, Christoph Hellwig wrote: > FMODE_NDELAY, FMODE_EXCL and FMODE_WRITE_IOCTL were only used for > block internal purposed and are now entirely unused, so remove them. > > Signed-off-by: Christoph Hellwig > --- Love it, Reviewed-by: Ch

Re: [PATCH 30/31] block: store the holder in file->private_data

2023-06-07 Thread Christian Brauner
> --- Feels a bit odd to store the object itself but anyway, Acked-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [PATCH 29/31] block: always use I_BDEV on file->f_mapping->host to find the bdev

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:48AM +0200, Christoph Hellwig wrote: > Always use I_BDEV(file->f_mapping->host) to find the bdev for a file to > free up file->private_data for other uses. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Ack

Re: [PATCH 28/31] block: replace fmode_t with a block-specific type for block open flags

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:47AM +0200, Christoph Hellwig wrote: > The only overlap between the block open flags mapped into the fmode_t and > other uses of fmode_t are FMODE_READ and FMODE_WRITE. Define a new and FMODE_EXCL afaict > blk_mode_t instead for use in blkdev_get_by_*, ->open and ->

Re: [PATCH 27/31] block: remove unused fmode_t arguments from ioctl handlers

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:46AM +0200, Christoph Hellwig wrote: > A few ioctl handlers have fmode_t arguments that are entirely unused, > remove them. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Ch

Re: [PATCH 26/31] block: move a few internal definitions out of blkdev.h

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:45AM +0200, Christoph Hellwig wrote: > All these helpers are only used in core block code, so move them out of > the public header. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Ch

Re: [PATCH 25/31] ubd: remove commented out code in ubd_open

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:44AM +0200, Christoph Hellwig wrote: > This code has been dead forever, make sure it doesn't show up in code > searches. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Christian Brauner _

Re: [PATCH 24/31] rnbd-srv: replace sess->open_flags with a "bool readonly"

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:43AM +0200, Christoph Hellwig wrote: > Stop passing the fmode_t around and just use a simple bool to track if > an export is read-only. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Ch

Re: [PATCH 23/31] mtd: block: use a simple bool to track open for write

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:42AM +0200, Christoph Hellwig wrote: > Instead of propagating the fmode_t, just use a bool to track if a mtd > block device was opened for writing. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Ch

Re: [PATCH 22/31] nvme: replace the fmode_t argument to the nvme ioctl handlers with a simple bool

2023-06-07 Thread Christian Brauner
good to me, Acked-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [PATCH 21/31] scsi: replace the fmode_t argument to ->sg_io_fn with a simple bool

2023-06-07 Thread Christian Brauner
good to me, Acked-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [PATCH 20/31] scsi: replace the fmode_t argument to scsi_ioctl with a simple bool

2023-06-07 Thread Christian Brauner
good to me, Acked-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [PATCH 19/31] scsi: replace the fmode_t argument to scsi_cmd_allowed with a simple bool

2023-06-07 Thread Christian Brauner
good to me, Acked-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [PATCH 18/31] fs: remove sb->s_mode

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:37AM +0200, Christoph Hellwig wrote: > There is no real need to store the open mode in the super_block now. > It is only used by f2fs, which can easily recalculate it. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Ch

Re: [PATCH 17/31] block: add a sb_open_mode helper

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:36AM +0200, Christoph Hellwig wrote: > Add a helper to return the open flags for blkdev_get_by* for passed in > super block flags instead of open coding the logic in many places. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acke

Re: [PATCH 16/31] block: use the holder as indication for exclusive opens

2023-06-07 Thread Christian Brauner
> > For blkdev_put this requires adding the holder argument, which provides > better debug checking that only the holder actually releases the hold, > but at the same time allows removing the now superfluous mode argument. > > Signed-off-by: Christoph Hellwig > --- Looks g

Re: [PATCH 15/31] btrfs: don't pass a holder for non-exclusive blkdev_get_by_path

2023-06-07 Thread Christian Brauner
v_get_by_path calls. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [PATCH 14/31] rnbd-srv: don't pass a holder for non-exclusive blkdev_get_by_path

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:33AM +0200, Christoph Hellwig wrote: > Passing a holder to blkdev_get_by_path when FMODE_EXCL isn't set doesn't > make sense, so pass NULL instead. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Ac

Re: [PATCH 11/31] block: rename blkdev_close to blkdev_release

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:30AM +0200, Christoph Hellwig wrote: > Make the function name match the method name. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Christian Brauner ___ linux-um mailing l

Re: [PATCH 10/31] block: remove the unused mode argument to ->release

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:29AM +0200, Christoph Hellwig wrote: > The mode argument to the ->release block_device_operation is never used, > so remove it. > > Signed-off-by: Christoph Hellwig > --- Good cleanup. Looks good to me, Acked-by:

Re: [PATCH 09/31] block: pass a gendisk to ->open

2023-06-07 Thread Christian Brauner
t; void (*release) (struct gendisk *, fmode_t); > int (*ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); > int (*compat_ioctl) (struct block_device *, fmode_t, unsigned, unsigned > long); Looks good to me, Acked-by: Christian Brauner (

Re: [PATCH 08/31] block: share code between disk_check_media_change and disk_force_media_change

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:27AM +0200, Christoph Hellwig wrote: > Factor the common logic between disk_check_media_change and > disk_force_media_change into a helper. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Ch

Re: [PATCH 07/31] block: pass a gendisk on bdev_check_media_change

2023-06-07 Thread Christian Brauner
gt; --- Under the assumption it did only in fact ever only get called on the whole device so far, Acked-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [PATCH 06/31] cdrom: remove the unused mode argument to cdrom_release

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:25AM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/m

Re: [PATCH 05/31] cdrom: track if a cdrom_device_info was opened for data

2023-06-07 Thread Christian Brauner
gt; nothing but the CDROM drivers uses that argument. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [PATCH 04/31] cdrom: remove the unused cdrom_close_write release code

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:23AM +0200, Christoph Hellwig wrote: > cdrom_close_write is empty, and the for_data flag it is keyed off is > never set. Remove all this clutter. > > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Ch

Re: [PATCH 03/31] cdrom: remove the unused mode argument to cdrom_ioctl

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:22AM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- Looks good to me, Acked-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/m

Re: [PATCH 02/31] cdrom: remove the unused bdev argument to cdrom_open

2023-06-07 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:21AM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- lgtm, Acked-by: Christian Brauner ___ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um

Re: [PATCH 01/31] block: also call ->open for incremental partition opens

2023-06-07 Thread Christian Brauner
> for ioctl only or NDELAY opens. > > Signed-off-by: Christoph Hellwig > --- This assumes that all drivers deal with additional ->open() calls for each partition correctly which I assumed you checked so, Acked-by: Christian Brauner ___

Re: decouple block open flags from fmode_t

2023-06-06 Thread Christian Brauner
On Tue, Jun 06, 2023 at 09:39:19AM +0200, Christoph Hellwig wrote: > Hi all, > > this series adds a new blk_mode_t for block open flags instead of abusing Trying to look at this series applied but doesn't apply cleanly for anything v6.4-rc* related. What tree is this on?

Re: [RFC PATCH v2] hostfs: handle idmapped mounts

2023-03-16 Thread Christian Brauner
On Thu, Mar 16, 2023 at 06:20:19AM +, Glenn Washburn wrote: > On 3/4/23 12:01, Christian Brauner wrote: > > On Sat, Mar 04, 2023 at 12:28:46AM -0600, Glenn Washburn wrote: > > > On Thu, 2 Mar 2023 09:39:28 +0100 > > > Christian Brauner wrote: > > > > &

Re: [RFC PATCH v2] hostfs: handle idmapped mounts

2023-03-04 Thread Christian Brauner
On Sat, Mar 04, 2023 at 12:28:46AM -0600, Glenn Washburn wrote: > On Thu, 2 Mar 2023 09:39:28 +0100 > Christian Brauner wrote: > > > On Tue, Feb 28, 2023 at 07:50:02PM -0600, Glenn Washburn wrote: > > > Let hostfs handle idmapped mounts. This allows to have the same >

Re: [RFC PATCH v2] hostfs: handle idmapped mounts

2023-03-02 Thread Christian Brauner
On Tue, Feb 28, 2023 at 07:50:02PM -0600, Glenn Washburn wrote: > Let hostfs handle idmapped mounts. This allows to have the same hostfs > mount appear in multiple locations with different id mappings. > > root@(none):/media# id > uid=0(root) gid=0(root) groups=0(root) > root@(none):/media# mkdir

Re: Which branch should this patch be based against?

2023-02-28 Thread Christian Brauner
On Mon, Feb 27, 2023 at 10:33:36AM -0600, Glenn Washburn wrote: > Hi, > > On Fri, 27 Jan 2023 19:41:59 -0600 > Glenn Washburn wrote: > > > Let hostfs handle idmapped mounts. This allows to have the same hostfs > > mount appear in multiple locations with different id mappings. > > This patch is