* [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl
@ 2015-05-13 17:15 Luke Dashjr
2015-05-13 17:38 ` Greg KH
2015-05-14 14:06 ` David Sterba
0 siblings, 2 replies; 4+ messages in thread
From: Luke Dashjr @ 2015-05-13 17:15 UTC (permalink / raw)
To: Chris Mason, Josef Bacik, David Sterba, linux-btrfs, linux-kernel
Cc: stable, trivial
32-bit ioctl uses these rather than the regular FS_IOC_* versions. They can be
handled in btrfs using the same code. Without this, 32-bit {ch,ls}attr fail.
Signed-off-by: Luke Dashjr <luke-jr+git@utopios.org>
---
fs/btrfs/ioctl.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 1c22c65..31af093 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -5225,10 +5225,13 @@ long btrfs_ioctl(struct file *file, unsigned int
switch (cmd) {
case FS_IOC_GETFLAGS:
+ case FS_IOC32_GETFLAGS:
return btrfs_ioctl_getflags(file, argp);
case FS_IOC_SETFLAGS:
+ case FS_IOC32_SETFLAGS:
return btrfs_ioctl_setflags(file, argp);
case FS_IOC_GETVERSION:
+ case FS_IOC32_GETVERSION:
return btrfs_ioctl_getversion(file, argp);
case FITRIM:
return btrfs_ioctl_fitrim(file, argp);
--
2.0.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl
2015-05-13 17:15 [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl Luke Dashjr
@ 2015-05-13 17:38 ` Greg KH
2015-05-14 14:06 ` David Sterba
1 sibling, 0 replies; 4+ messages in thread
From: Greg KH @ 2015-05-13 17:38 UTC (permalink / raw)
To: Luke Dashjr
Cc: Chris Mason, Josef Bacik, David Sterba, linux-btrfs, linux-kernel,
stable, trivial
On Wed, May 13, 2015 at 05:15:26PM +0000, Luke Dashjr wrote:
> 32-bit ioctl uses these rather than the regular FS_IOC_* versions. They can be
> handled in btrfs using the same code. Without this, 32-bit {ch,ls}attr fail.
>
> Signed-off-by: Luke Dashjr <luke-jr+git@utopios.org>
> ---
> fs/btrfs/ioctl.c | 3 +++
> 1 file changed, 3 insertions(+)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read Documentation/stable_kernel_rules.txt
for how to do this properly.
</formletter>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl
2015-05-13 17:15 [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl Luke Dashjr
2015-05-13 17:38 ` Greg KH
@ 2015-05-14 14:06 ` David Sterba
2015-05-14 16:27 ` Luke Dashjr
1 sibling, 1 reply; 4+ messages in thread
From: David Sterba @ 2015-05-14 14:06 UTC (permalink / raw)
To: Luke Dashjr
Cc: Chris Mason, Josef Bacik, David Sterba, linux-btrfs, linux-kernel,
stable, trivial
On Wed, May 13, 2015 at 05:15:26PM +0000, Luke Dashjr wrote:
> 32-bit ioctl uses these rather than the regular FS_IOC_* versions. They can be
> handled in btrfs using the same code. Without this, 32-bit {ch,ls}attr fail.
Yes, but this has to be implemented in another way. See eg.
https://git.kernel.org/linus/e9750824114ff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl
2015-05-14 14:06 ` David Sterba
@ 2015-05-14 16:27 ` Luke Dashjr
0 siblings, 0 replies; 4+ messages in thread
From: Luke Dashjr @ 2015-05-14 16:27 UTC (permalink / raw)
To: dsterba
Cc: Chris Mason, Josef Bacik, linux-btrfs, linux-kernel, stable,
trivial
On Thursday, May 14, 2015 2:06:17 PM David Sterba wrote:
> On Wed, May 13, 2015 at 05:15:26PM +0000, Luke Dashjr wrote:
> > 32-bit ioctl uses these rather than the regular FS_IOC_* versions. They
> > can be handled in btrfs using the same code. Without this, 32-bit
> > {ch,ls}attr fail.
>
> Yes, but this has to be implemented in another way. See eg.
> https://git.kernel.org/linus/e9750824114ff
I don't see what is different with that implementation. All f2fs_compat_ioctl
does is change cmd to the plain-IOC equivalent and call f2fs_ioctl with the
same arg (compat_ptr merely causes a cast to void* and back, which AFAIK is a
noop on 64-bit?). Am I missing something? I could try to just imitate it, but
I'd rather know what is significant/going on to ensure I don't waste your time
with code I don't even properly understand myself.
Perhaps by coincidence, the patch does at least in practice work (although at
least `btrfs send` appears to be broken still, and I'm at a loss for how to
approach fixing that).
Luke
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-14 16:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-13 17:15 [PATCH] btrfs: bugfix: handle FS_IOC32_{GETFLAGS,SETFLAGS,GETVERSION} in btrfs_ioctl Luke Dashjr
2015-05-13 17:38 ` Greg KH
2015-05-14 14:06 ` David Sterba
2015-05-14 16:27 ` Luke Dashjr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox