All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Mikulas Patocka <mikulas@twibright.com>,
	Al Viro <viro@zeniv.linux.org.uk>, "Ted Ts'o" <tytso@google.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH] hpfs: add fstrim support
Date: Sun, 28 Jun 2015 12:52:11 -0700	[thread overview]
Message-ID: <CA+55aFzY9Y8tgrv=HW6Sia_CmgLvn6_pC4MnLQYbmC8Urfbh+Q@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1506281506450.29365@leontynka>

On Sun, Jun 28, 2015 at 6:16 AM, Mikulas Patocka <mikulas@twibright.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

  reply	other threads:[~2015-06-28 19:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-28 13:16 Mikulas Patocka
2015-06-28 19:52 ` Linus Torvalds [this message]
2015-06-28 20:59   ` Al Viro
2015-06-28 21:46     ` Linus Torvalds
2015-07-09 16:05   ` [PATCH] ioctl_compat: handle FITRIM Mikulas Patocka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+55aFzY9Y8tgrv=HW6Sia_CmgLvn6_pC4MnLQYbmC8Urfbh+Q@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikulas@twibright.com \
    --cc=tytso@google.com \
    --cc=viro@zeniv.linux.org.uk \
    --subject='Re: [PATCH] hpfs: add fstrim support' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.