Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1552984 > unrolled thread
| Started by | Joseph Salisbury <joseph.salisbury@canonical.com> |
|---|---|
| First post | 2017-01-06 18:30 +0100 |
| Last post | 2017-01-09 12:40 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[Regression 4.7-rc1] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl Joseph Salisbury <joseph.salisbury@canonical.com> - 2017-01-06 18:30 +0100
Re: [Regression 4.7-rc1] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl Luke Dashjr <luke@dashjr.org> - 2017-01-06 19:00 +0100
Re: [Regression 4.7-rc1] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl David Sterba <dsterba@suse.cz> - 2017-01-09 12:40 +0100
| From | Joseph Salisbury <joseph.salisbury@canonical.com> |
|---|---|
| Date | 2017-01-06 18:30 +0100 |
| Subject | [Regression 4.7-rc1] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl |
| Message-ID | <sWGuZ-569-13@gated-at.bofh.it> |
Hi Luke,
A kernel bug report was opened against Ubuntu [0]. This bug was fixed
by the following commit in v4.7-rc1:
commit 4c63c2454eff996c5e27991221106eb511f7db38
Author: Luke Dashjr <luke@dashjr.org>
Date: Thu Oct 29 08:22:21 2015 +0000
btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in
btrfs_ioctl
However, this commit introduced a new regression. With this commit
applied, "btrfs fi show" no longer works and the btrfs snapshot
functionality breaks.
I was hoping to get your feedback, since you are the patch author. Do
you think gathering any additional data will help diagnose this issue,
or would it be best to submit a revert request?
Thanks,
Joe
[0] http://pad.lv/1619918
[toc] | [next] | [standalone]
| From | Luke Dashjr <luke@dashjr.org> |
|---|---|
| Date | 2017-01-06 19:00 +0100 |
| Subject | Re: [Regression 4.7-rc1] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl |
| Message-ID | <sWGY1-5hC-3@gated-at.bofh.it> |
| In reply to | #1552984 |
On Friday, January 06, 2017 5:22:34 PM Joseph Salisbury wrote:
> btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in
> btrfs_ioctl
>
> However, this commit introduced a new regression. With this commit
> applied, "btrfs fi show" no longer works and the btrfs snapshot
> functionality breaks.
I don't see how this is even possibly related. Furthermore, "btrfs fi show" as
well as snapshots seem to work just fine for me.
That being said, I've given up on running a 32-bit userspace, so I don't
really care if this bugfix gets reverted or not.
Luke
[toc] | [prev] | [next] | [standalone]
| From | David Sterba <dsterba@suse.cz> |
|---|---|
| Date | 2017-01-09 12:40 +0100 |
| Message-ID | <sXGsW-3Bn-41@gated-at.bofh.it> |
| In reply to | #1552984 |
On Fri, Jan 06, 2017 at 12:22:34PM -0500, Joseph Salisbury wrote:
> A kernel bug report was opened against Ubuntu [0]. This bug was fixed
> by the following commit in v4.7-rc1:
>
> commit 4c63c2454eff996c5e27991221106eb511f7db38
>
> Author: Luke Dashjr <luke@dashjr.org>
> Date: Thu Oct 29 08:22:21 2015 +0000
>
> btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in
> btrfs_ioctl
>
>
> However, this commit introduced a new regression. With this commit
> applied, "btrfs fi show" no longer works and the btrfs snapshot
> functionality breaks.
A plain 32bit kernel with 32bit userspace works fine. The bug seems to
be on a 64bit kernel with 32bit userspace and the CONFIG_COMPAT compiled
in. Strace does not show anything special:
stat64("subv1", 0xffc64fcc) = -1 ENOENT (No such file or directory)
statfs64(".", 84, {f_type=BTRFS_SUPER_MAGIC, f_bsize=4096, f_blocks=5110784, f_bfree=4076143, f_bavail=4010951, f_files=0, f_ffree=0, f_fsid={val=[
4260464218, 2297804334]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
stat64(".", {st_mode=S_IFDIR|0700, st_size=228, ...}) = 0
stat64(".", {st_mode=S_IFDIR|0700, st_size=228, ...}) = 0
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFDIR|0700, st_size=228, ...}) = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
write(1, "Create subvolume './subv1'\n", 27) = 27
ioctl(3, BTRFS_IOC_SUBVOL_CREATE, {fd=0, name="subv1"}) = -1 ENOTTY (Inappropriate ioctl for device)
The value of BTRFS_IOC_SUBVOL_CREATE is same on 32bit and 64bit kernels.
As it returns ENOTTY, the value is not recognized. A candidate function
is btrfs_compat_ioctl that checks for just the IOC32 numbers and returns
-ENOIOCTLCMD otherwise.
The callchain in fs/compat_ioctl.c:ioctl cheks for the specific callback
first, if it retunrs -ENOIOCTLCMD then goes to the normal ioctl
callback, so there's always a point we reach the handler of
BTRFS_IOC_SUBVOL_CREATE. So I don't see how it could happen.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web