Re: Setting ->s_dev to a char device (Was: Re: [PATCH v2] ubifs: allow userspace to map mounts to volumes)

2017-05-29 Thread Richard Weinberger
Rabin, Am 29.05.2017 um 16:33 schrieb Rabin Vincent: > On Mon, May 29, 2017 at 01:08:25PM +0100, Al Viro wrote: >> Userspace sure as hell does. st_dev in stat(2) is a block device number; >> moreover, there might _be_ a block device with the same number at the same >> time - even mounted. Why no

Re: Setting ->s_dev to a char device (Was: Re: [PATCH v2] ubifs: allow userspace to map mounts to volumes)

2017-05-29 Thread Rabin Vincent
On Mon, May 29, 2017 at 01:08:25PM +0100, Al Viro wrote: > Userspace sure as hell does. st_dev in stat(2) is a block device number; > moreover, there might _be_ a block device with the same number at the same > time - even mounted. Why not make ->show_options() print the currently > valid volume

Re: Setting ->s_dev to a char device (Was: Re: [PATCH v2] ubifs: allow userspace to map mounts to volumes)

2017-05-29 Thread Al Viro
On Mon, May 29, 2017 at 01:50:30PM +0200, Richard Weinberger wrote: > CC'ing VFS folks > > Am 29.05.2017 um 09:22 schrieb Rabin Vincent: > > From: Rabin Vincent > > > > There currently appears to be no way for userspace to find out the > > underlying volume number for a mounted ubifs file system

Setting ->s_dev to a char device (Was: Re: [PATCH v2] ubifs: allow userspace to map mounts to volumes)

2017-05-29 Thread Richard Weinberger
CC'ing VFS folks Am 29.05.2017 um 09:22 schrieb Rabin Vincent: > From: Rabin Vincent > > There currently appears to be no way for userspace to find out the > underlying volume number for a mounted ubifs file system, since ubifs > uses anonymous block devices. The volume name is present in > /pr

[PATCH v2] ubifs: allow userspace to map mounts to volumes

2017-05-29 Thread Rabin Vincent
From: Rabin Vincent There currently appears to be no way for userspace to find out the underlying volume number for a mounted ubifs file system, since ubifs uses anonymous block devices. The volume name is present in /proc/mounts but UBI volumes can be renamed after the volume has been mounted.