[<prev] [next>] [day] [month] [year] [list]
Message-ID: <46A4E3F1.7050602@redhat.com>
Date: Mon, 23 Jul 2007 10:22:57 -0700
From: Ulrich Drepper <drepper@...hat.com>
To: Linux Kernel <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: fallocate syscall interface defficiency
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The fallocate syscall returns ENOSYS in case the filesystem does not
support the operation and expects the userlevel code to fill in. This
is good in concept.
The problem is that the libc code for old kernels should be able to
distinguish the case where the syscall is not at all available vs not
functioning for a specific mount point. As is this is not possible and
we always have to invoke the syscall even if the kernel doesn't support it.
I suggest the following patch (and yes, Al, you need a mailer which
automatically removes "- " before leading dashes). Using EOPNOTSUPP is
IMO the right thing to do.
- --- fs/open.c 2007-07-18 20:25:41.000000000 -0700
+++ fs/open.c-new 2007-07-23 10:17:17.000000000 -0700
@@ -403,7 +403,7 @@
if (inode->i_op && inode->i_op->fallocate)
ret = inode->i_op->fallocate(inode, mode, offset, len);
else
- - ret = -ENOSYS;
+ ret = -EOPNOTSUPP;
out_fput:
fput(file);
- --
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFGpOPx2ijCOnn/RHQRAl4aAKC0TtQ65aBGhORbnniQg9lJwoWiQgCfT2B7
BGgDLLcTgGsd1I9HMRo/+z4=
=G5y6
-----END PGP SIGNATURE-----
-
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