On Thu, 25 Oct 2007, Pekka Enberg wrote:
On 10/25/07, Hugh Dickins [EMAIL PROTECTED] wrote:
--- 2.6.24-rc1/mm/shmem.c 2007-10-24 07:16:04.0 +0100
+++ linux/mm/shmem.c2007-10-24 22:31:09.0 +0100
@@ -915,6 +915,21 @@ static int shmem_writepage(struct page *
Hello.
Arjan van de Ven wrote:
when will you post this filesystem for inclusion into kernel.org kernel?
(and please really consider posting the patch together with that patch)
(also, if you can give a pointer to the source code of this filesystem
you might even get early code review)
I have
In message [EMAIL PROTECTED], Hugh Dickins writes:
On Thu, 25 Oct 2007, Pekka Enberg wrote:
With unionfs also fixed, we don't know of an absolute need for this
patch (and so, on that basis, the !wbc-for_reclaim case could indeed
be removed very soon); but as I see it, the unionfs case has
Here's a set of patches that remove all calls to iget() and all read_inode()
functions. They should be removed for two reasons: firstly they don't lend
themselves to good error handling, and secondly their presence is a temptation
for code outside a filesystem to call iget() to access inodes
Add an ERR_CAST() macro to complement ERR_PTR and co. for the purposes of
casting an error entyped as one pointer type to an error of another pointer
type whilst making it explicit as to what is going on.
This provides a replacement for the ERR_PTR(PTR_ERR(p)) construct.
Signed-off-by: David
Convert instances of ERR_PTR(PTR_ERR(p)) to ERR_CAST(p) using:
perl -spi -e 's/ERR_PTR[(]PTR_ERR[(](.*)[)][)]/ERR_CAST(\1)/' `grep -rl
'ERR_PTR[(]*PTR_ERR' fs crypto net security`
Signed-off-by: David Howells [EMAIL PROTECTED]
---
crypto/cbc.c |2 +-
crypto/cryptd.c
Introduce a function to register failure in an inode construction path. This
includes marking the inode under construction as bad, unlocking it and
releasing it.
Signed-off-by: David Howells [EMAIL PROTECTED]
---
Documentation/filesystems/porting | 18 +-
fs/bad_inode.c
Use iget_failed() in AFS to kill a failed inode.
Signed-off-by: David Howells [EMAIL PROTECTED]
---
fs/afs/inode.c |5 +
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/fs/afs/inode.c b/fs/afs/inode.c
index d196840..ca9b02f 100644
--- a/fs/afs/inode.c
+++ b/fs/afs/inode.c
Use iget_failed() in GFS2 to kill a failed inode.
Signed-off-by: David Howells [EMAIL PROTECTED]
---
fs/gfs2/inode.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 5f6dc32..c5285e2 100644
--- a/fs/gfs2/inode.c
+++
Stop the autofs filesystem from using iget() and read_inode(). Replace
autofs_read_inode() with autofs_iget(), and call that instead of iget().
autofs_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
Signed-off-by: David
Stop the BEFS filesystem from using iget() and read_inode(). Replace
befs_read_inode() with befs_iget(), and call that instead of iget().
befs_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
befs_fill_super() returns any error
Stop the BFS filesystem from using iget() and read_inode(). Replace
bfs_read_inode() with bfs_iget(), and call that instead of iget().
bfs_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
bfs_fill_super() returns any error
Stop the EFS filesystem from using iget() and read_inode(). Replace
efs_read_inode() with efs_iget(), and call that instead of iget().
efs_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
efs_fill_super() returns any error
Stop the EXT2 filesystem from using iget() and read_inode(). Replace
ext2_read_inode() with ext2_iget(), and call that instead of iget().
ext2_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
ext2_fill_super() returns any error
Stop the EXT3 filesystem from using iget() and read_inode(). Replace
ext3_read_inode() with ext3_iget(), and call that instead of iget().
ext3_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
ext3_fill_super() returns any error
Stop the ISOFS filesystem from using read_inode(). Make isofs_read_inode()
return an error code, and make isofs_iget() pass it on.
Signed-off-by: David Howells [EMAIL PROTECTED]
---
fs/isofs/inode.c | 25 +
1 files changed, 17 insertions(+), 8 deletions(-)
diff --git
Stop the FAT filesystem from using iget() and read_inode(). Replace
the call to iget() with a call to ilookup().
Signed-off-by: David Howells [EMAIL PROTECTED]
---
fs/fat/inode.c |6 ++
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index
Stop the JFFS2 filesystem from using iget() and read_inode(). Replace
jffs2_read_inode() with jffs2_iget(), and call that instead of iget().
jffs2_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
jffs2_do_fill_super() returns
Stop the FreeVXFS filesystem from using iget() and read_inode(). Replace
vxfs_read_inode() with vxfs_iget(), and call that instead of iget().
vxfs_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
vxfs_fill_super() returns any
Stop the JFS filesystem from using iget() and read_inode(). Replace
jfs_read_inode() with jfs_iget(), and call that instead of iget().
jfs_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
jfs_fill_super() returns any error
Stop the EXT4 filesystem from using iget() and read_inode(). Replace
ext4_read_inode() with ext4_iget(), and call that instead of iget().
ext4_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
ext4_fill_super() returns any error
Stop the MINIX filesystem from using iget() and read_inode(). Replace
minix_read_inode() with minix_iget(), and call that instead of iget().
minix_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
minix_fill_super() returns any
Stop the FUSE filesystem from using read_inode(), which it doesn't use anyway.
Signed-off-by: David Howells [EMAIL PROTECTED]
---
fs/fuse/inode.c |6 --
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 9a68d69..e50be15 100644
---
Stop the HFSPLUS filesystem from using iget() and read_inode(). Replace
hfsplus_read_inode() with hfsplus_iget(), and call that instead of iget().
hfsplus_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
hfsplus_fill_super()
Stop the ROMFS filesystem from using iget() and read_inode(). Replace
romfs_read_inode() with romfs_iget(), and call that instead of iget().
romfs_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
romfs_fill_super() returns any
Stop the SYSV filesystem from using iget() and read_inode(). Replace
sysv_read_inode() with sysv_iget(), and call that instead of iget().
sysv_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
Signed-off-by: David Howells [EMAIL
Stop the UFS filesystem from using iget() and read_inode(). Replace
ufs_read_inode() with ufs_iget(), and call that instead of iget().
ufs_iget() then uses iget_locked() directly and returns a proper error code
instead of an inode in the event of an error.
ufs_fill_super() returns any error
Stop the OPENPROMFS filesystem from using iget() and read_inode(). Replace
openpromfs_read_inode() with openpromfs_iget(), and call that instead of
iget(). openpromfs_iget() then uses iget_locked() directly and returns a
proper error code instead of an inode in the event of an error.
Stop the PROCFS filesystem from using iget() and read_inode(). Merge
procfs_read_inode() into procfs_get_inode(), and have that call iget_locked()
instead of iget().
Signed-off-by: David Howells [EMAIL PROTECTED]
---
fs/proc/inode.c | 60
Stop the HOSTFS filesystem from using iget() and read_inode(). Provide
hostfs_iget(), and call that instead of iget(). hostfs_iget() then uses
iget_locked() directly and returns a proper error code instead of an inode in
the event of an error.
hostfs_fill_sb_common() returns any error incurred
Stop the HPPFS filesystem from using iget() and read_inode(). Provide an
hppfs_iget(), and call that instead of iget(). hppfs_iget() then uses
iget_locked() directly and returns a proper error code instead of an inode in
the event of an error.
hppfs_fill_sb_common() returns any error incurred
Remove the old iget() call and the read_inode() superblock operation it uses
as these are really obsolete, and the use of read_inode() does not produce
proper error handling (no distinction between ENOMEM and EIO when marking
an inode bad).
Furthermore, this removes the temptation to use iget()
On Mon, 22 Oct 2007, Erez Zadok wrote:
In message [EMAIL PROTECTED], Hugh Dickins writes:
Only ramdisk and shmem have been returning AOP_WRITEPAGE_ACTIVATE.
Both of those set BDI_CAP_NO_WRITEBACK. ramdisk never returned it
if !wbc-for_reclaim. I contend that shmem shouldn't either:
That's a nice historical review, Huge, of how got into these mess we're in
now -- it all starts with good intentions. :-)
On a related note, I would just love to get rid of calling the lower
-writepage in unionfs b/c I can't even tell if I have a lower page to use
all the time. I'd prefer to
On Mon, 22 Oct 2007, Erez Zadok wrote:
What's the precise semantics of AOP_WRITEPAGE_ACTIVATE?
Sigh - not at you, at it! It's a secret that couldn't be kept secret,
a hack for tmpfs reclaim, let's just look forward to it going away.
Is it considered an error or not?
No, it's definitely not
Erez Zadok wrote:
In message [EMAIL PROTECTED], Hugh Dickins writes:
On Thu, 25 Oct 2007, Pekka Enberg wrote:
With unionfs also fixed, we don't know of an absolute need for this
patch (and so, on that basis, the !wbc-for_reclaim case could indeed
be removed very soon); but as I see it, the
On Wed, Oct 24, 2007 at 05:27:04PM +0200, Miklos Szeredi wrote:
Wouldn't you be better off by attempting to implement an open
by ino operation and an operation to get the generation count
for the file and then modifying the network protocol of interest
to use these as identifiers for
On Thu, Oct 25, 2007 at 09:07:36PM +0200, Jan Kara wrote:
Hi,
This is overdue, sorry. Got a little complicated, and I've been away from
my filesystem test setup so I didn't want ot send it (lucky, coz I found
a bug after more substantial testing).
Anyway, RFC?
Hmm, maybe one
Add an ERR_CAST() function to complement ERR_PTR and co. for the purposes of
casting an error entyped as one pointer type to an error of another pointer
type whilst making it explicit as to what is going on.
This provides a replacement for the ERR_PTR(PTR_ERR(p)) construct.
Signed-off-by: David
+ * ERR_CAST - Explicitly cast an error-valued pointer to another pointer type
+ * @ptr: The pointer to cast.
+ *
+ * Explicitly cast an error-valued pointer to another pointer type in such a
+ * way as to make it clear that's what's going on.
+ */
+static inline void *ERR_CAST(const void
On Wed, Oct 24, 2007 at 05:27:04PM +0200, Miklos Szeredi wrote:
Wouldn't you be better off by attempting to implement an open
by ino operation and an operation to get the generation count
for the file and then modifying the network protocol of interest
to use these as identifiers
Remove the need for having CAP_SYS_RAWIO when doing a FIBMAP call on an open
file descriptor.
It would be nice to allow users to have permission to see where their data is
landing on disk, and there really isn't a good reason to keep them from getting
at this information.
Signed-off-by: Mike
+static inline void *ERR_CAST(const void *ptr)
+{
+ return (void *) ptr;
+}
Just to nit, surely you don't need the cast inside the function. The
casting happens at the call site between the argument and returned pointer.
The way it's written you kinda do, since it takes a
On Thu, 25 Oct 2007 16:09:09 -0700
Zach Brown [EMAIL PROTECTED] wrote:
+ * ERR_CAST - Explicitly cast an error-valued pointer to another pointer
type
+ * @ptr: The pointer to cast.
+ *
+ * Explicitly cast an error-valued pointer to another pointer type in such
a
+ * way as to
Quoting James Morris ([EMAIL PROTECTED]):
On Mon, 22 Oct 2007, David P. Quigley wrote:
Originally vfs_getxattr would pull the security xattr variable using
the inode getxattr handle and then proceed to clobber it with a subsequent
call
to the LSM. This patch reorders the two operations
On Fri, Oct 26, 2007 at 01:10:14AM +0200, Miklos Szeredi wrote:
On Wed, Oct 24, 2007 at 05:27:04PM +0200, Miklos Szeredi wrote:
Wouldn't you be better off by attempting to implement an open
by ino operation and an operation to get the generation count
for the file and then
Quoting David P. Quigley ([EMAIL PROTECTED]):
This patch modifies the interface to inode_getsecurity to have the
function return a buffer containing the security blob and its length via
parameters instead of relying on the calling function to give it an
appropriately sized buffer.
On Thu, 25 Oct 2007 16:06:40 -0700
Mike Waychison [EMAIL PROTECTED] wrote:
Remove the need for having CAP_SYS_RAWIO when doing a FIBMAP call on an open
file descriptor.
It would be nice to allow users to have permission to see where their data is
landing on disk, and there really isn't a
Roland Dreier wrote:
+static inline void *ERR_CAST(const void *ptr)
+{
+return (void *) ptr;
+}
Just to nit, surely you don't need the cast inside the function. The
casting happens at the call site between the argument and returned pointer.
The way it's
Alan Cox wrote:
On Thu, 25 Oct 2007 16:06:40 -0700
Mike Waychison [EMAIL PROTECTED] wrote:
Remove the need for having CAP_SYS_RAWIO when doing a FIBMAP call on an open
file descriptor.
It would be nice to allow users to have permission to see where their data is
landing on disk, and there
I found Chris's comment about negative block numbers, I'll send a patch
out for that.
You mentioned back in 99 about racing with ftruncate. Is it sufficient
to mutex_lock(i_mutex) and down_read(i_alloc_sem)?
One for the fs guys. That code has changed far beyond anything I
understand any
On Thursday October 25, [EMAIL PROTECTED] wrote:
On Mon, 22 Oct 2007, Pekka Enberg wrote:
On 10/22/07, Hugh Dickins [EMAIL PROTECTED] wrote:
Only ramdisk and shmem have been returning AOP_WRITEPAGE_ACTIVATE.
Both of those set BDI_CAP_NO_WRITEBACK. ramdisk never returned it
if
52 matches
Mail list logo