[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFzY9Y8tgrv=HW6Sia_CmgLvn6_pC4MnLQYbmC8Urfbh+Q@mail.gmail.com>
Date: Sun, 28 Jun 2015 12:52:11 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Mikulas Patocka <mikulas@...bright.com>,
Al Viro <viro@...iv.linux.org.uk>,
"Ted Ts'o" <tytso@...gle.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH] hpfs: add fstrim support
On Sun, Jun 28, 2015 at 6:16 AM, Mikulas Patocka <mikulas@...bright.com> wrote:
> This patch adds support for fstrim to the HPFS filesystem.
...
> +#ifdef CONFIG_COMPAT
> + .compat_ioctl = hpfs_compat_ioctl,
> +#endif
...
> +#ifdef CONFIG_COMPAT
> + .compat_ioctl = hpfs_compat_ioctl,
> +#endif
...
> +#ifdef CONFIG_COMPAT
> +long hpfs_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg)
> +{
> + return hpfs_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
> +}
> +#endif
Hmm. You've clearly copied this pattern from other filesystems, and so
I can't really blame you, but this thing annoys me a lot.
Why isn't FITRIM just marked as a COMPATIBLE_IOCTL(), at which point
the generic ioctl layer will do exactly the above translation for us?
Am I missing something?
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists