Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-28 Thread Christoph Hellwig
On Thu, Sep 27, 2007 at 02:51:25PM -0700, Andrew Morton wrote:
> That'll be because reiserfs-convert-to-new-aops.patch witched reiserfs over
> to ->write_begin() and ->write_end().

Yeah, I was looking at mainline.

> So your stuff becomes dependent on Nick's stuff, and Nick's stuff is still
> failing on NFS, I think.

I'd rather avoid the paramater removal for now, that makes it less
entangle, and it's an unrelated cleanup anyway.

Btw, there's more abuse of this sort in reiserfs.  Various other places
in xattr.c call dentry_open directly without the vfsmount aswell.  And
handling of an external journal uses filp_open which is similarly stupid,
it should use open_bdev_excl like xfs or the generic code to open the
main filesystem blockdevice.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-28 Thread Christoph Hellwig
On Thu, Sep 27, 2007 at 02:51:25PM -0700, Andrew Morton wrote:
 That'll be because reiserfs-convert-to-new-aops.patch witched reiserfs over
 to -write_begin() and -write_end().

Yeah, I was looking at mainline.

 So your stuff becomes dependent on Nick's stuff, and Nick's stuff is still
 failing on NFS, I think.

I'd rather avoid the paramater removal for now, that makes it less
entangle, and it's an unrelated cleanup anyway.

Btw, there's more abuse of this sort in reiserfs.  Various other places
in xattr.c call dentry_open directly without the vfsmount aswell.  And
handling of an external journal uses filp_open which is similarly stupid,
it should use open_bdev_excl like xfs or the generic code to open the
main filesystem blockdevice.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-27 Thread Peter Zijlstra

On Thu, 2007-09-27 at 14:51 -0700, Andrew Morton wrote:

> So your stuff becomes dependent on Nick's stuff, and Nick's stuff is still
> failing on NFS, I think.

It worked today, it turned out to be a UML bug. Real hardware seemed to
work properly, but will test a bit more tomorrow.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-27 Thread Andrew Morton
On Thu, 27 Sep 2007 14:51:25 -0700
Andrew Morton <[EMAIL PROTECTED]> wrote:

> > Plus, reiserfs seems to compile with that patch I just sent.  Sure as
> > heck surprised me.
> > 
> 
> That'll be because reiserfs-convert-to-new-aops.patch witched reiserfs over
> to ->write_begin() and ->write_end().

Actually, we should rename reiserfs_prepare_write and reiserfs_commit_write
to something else to reduce confusion.  Probably lots of other filesystems
would benefit from the same change, post-Nick's-stuff.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-27 Thread Andrew Morton
On Thu, 27 Sep 2007 14:27:14 -0700
Dave Hansen <[EMAIL PROTECTED]> wrote:

> On Thu, 2007-09-27 at 22:04 +0100, Christoph Hellwig wrote:
> > On Thu, Sep 27, 2007 at 01:53:39PM -0700, Dave Hansen wrote:
> > > -int reiserfs_commit_write(struct file *f, struct page *page,
> > > -   unsigned from, unsigned to);
> > > -int reiserfs_prepare_write(struct file *f, struct page *page,
> > > -unsigned from, unsigned to);
> > > +int reiserfs_commit_write(struct page *page, unsigned from, unsigned to);
> > > +int reiserfs_prepare_write(struct page *page, unsigned from, unsigned 
> > > to);
> > 
> > I doubt this will work.  These are also used for the ->prepare_write
> > and ->commit_write aops, and the method signature definitively wants
> > a file there, even if it's zero..
> 
> Oddly enough, I don't see those functions being used in aops:
> 
> const struct address_space_operations reiserfs_address_space_operations = {
> .writepage = reiserfs_writepage,
> .readpage = reiserfs_readpage,
> .readpages = reiserfs_readpages,
> .releasepage = reiserfs_releasepage,
> .invalidatepage = reiserfs_invalidatepage,
> .sync_page = block_sync_page,
> .write_begin = reiserfs_write_begin,
> .write_end = reiserfs_write_end,
> .bmap = reiserfs_aop_bmap,
> .direct_IO = reiserfs_direct_IO,
> .set_page_dirty = reiserfs_set_page_dirty,
> };
> 
> Plus, reiserfs seems to compile with that patch I just sent.  Sure as
> heck surprised me.
> 

That'll be because reiserfs-convert-to-new-aops.patch witched reiserfs over
to ->write_begin() and ->write_end().

So your stuff becomes dependent on Nick's stuff, and Nick's stuff is still
failing on NFS, I think.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-27 Thread Dave Hansen
On Thu, 2007-09-27 at 22:04 +0100, Christoph Hellwig wrote:
> On Thu, Sep 27, 2007 at 01:53:39PM -0700, Dave Hansen wrote:
> > -int reiserfs_commit_write(struct file *f, struct page *page,
> > - unsigned from, unsigned to);
> > -int reiserfs_prepare_write(struct file *f, struct page *page,
> > -  unsigned from, unsigned to);
> > +int reiserfs_commit_write(struct page *page, unsigned from, unsigned to);
> > +int reiserfs_prepare_write(struct page *page, unsigned from, unsigned to);
> 
> I doubt this will work.  These are also used for the ->prepare_write
> and ->commit_write aops, and the method signature definitively wants
> a file there, even if it's zero..

Oddly enough, I don't see those functions being used in aops:

const struct address_space_operations reiserfs_address_space_operations = {
.writepage = reiserfs_writepage,
.readpage = reiserfs_readpage,
.readpages = reiserfs_readpages,
.releasepage = reiserfs_releasepage,
.invalidatepage = reiserfs_invalidatepage,
.sync_page = block_sync_page,
.write_begin = reiserfs_write_begin,
.write_end = reiserfs_write_end,
.bmap = reiserfs_aop_bmap,
.direct_IO = reiserfs_direct_IO,
.set_page_dirty = reiserfs_set_page_dirty,
};

Plus, reiserfs seems to compile with that patch I just sent.  Sure as
heck surprised me.

-- Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-27 Thread Christoph Hellwig
On Thu, Sep 27, 2007 at 01:53:39PM -0700, Dave Hansen wrote:
> -int reiserfs_commit_write(struct file *f, struct page *page,
> -   unsigned from, unsigned to);
> -int reiserfs_prepare_write(struct file *f, struct page *page,
> -unsigned from, unsigned to);
> +int reiserfs_commit_write(struct page *page, unsigned from, unsigned to);
> +int reiserfs_prepare_write(struct page *page, unsigned from, unsigned to);

I doubt this will work.  These are also used for the ->prepare_write
and ->commit_write aops, and the method signature definitively wants
a file there, even if it's zero..

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-27 Thread Christoph Hellwig
On Thu, Sep 27, 2007 at 01:53:39PM -0700, Dave Hansen wrote:
 -int reiserfs_commit_write(struct file *f, struct page *page,
 -   unsigned from, unsigned to);
 -int reiserfs_prepare_write(struct file *f, struct page *page,
 -unsigned from, unsigned to);
 +int reiserfs_commit_write(struct page *page, unsigned from, unsigned to);
 +int reiserfs_prepare_write(struct page *page, unsigned from, unsigned to);

I doubt this will work.  These are also used for the -prepare_write
and -commit_write aops, and the method signature definitively wants
a file there, even if it's zero..

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-27 Thread Dave Hansen
On Thu, 2007-09-27 at 22:04 +0100, Christoph Hellwig wrote:
 On Thu, Sep 27, 2007 at 01:53:39PM -0700, Dave Hansen wrote:
  -int reiserfs_commit_write(struct file *f, struct page *page,
  - unsigned from, unsigned to);
  -int reiserfs_prepare_write(struct file *f, struct page *page,
  -  unsigned from, unsigned to);
  +int reiserfs_commit_write(struct page *page, unsigned from, unsigned to);
  +int reiserfs_prepare_write(struct page *page, unsigned from, unsigned to);
 
 I doubt this will work.  These are also used for the -prepare_write
 and -commit_write aops, and the method signature definitively wants
 a file there, even if it's zero..

Oddly enough, I don't see those functions being used in aops:

const struct address_space_operations reiserfs_address_space_operations = {
.writepage = reiserfs_writepage,
.readpage = reiserfs_readpage,
.readpages = reiserfs_readpages,
.releasepage = reiserfs_releasepage,
.invalidatepage = reiserfs_invalidatepage,
.sync_page = block_sync_page,
.write_begin = reiserfs_write_begin,
.write_end = reiserfs_write_end,
.bmap = reiserfs_aop_bmap,
.direct_IO = reiserfs_direct_IO,
.set_page_dirty = reiserfs_set_page_dirty,
};

Plus, reiserfs seems to compile with that patch I just sent.  Sure as
heck surprised me.

-- Dave

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-27 Thread Andrew Morton
On Thu, 27 Sep 2007 14:27:14 -0700
Dave Hansen [EMAIL PROTECTED] wrote:

 On Thu, 2007-09-27 at 22:04 +0100, Christoph Hellwig wrote:
  On Thu, Sep 27, 2007 at 01:53:39PM -0700, Dave Hansen wrote:
   -int reiserfs_commit_write(struct file *f, struct page *page,
   -   unsigned from, unsigned to);
   -int reiserfs_prepare_write(struct file *f, struct page *page,
   -unsigned from, unsigned to);
   +int reiserfs_commit_write(struct page *page, unsigned from, unsigned to);
   +int reiserfs_prepare_write(struct page *page, unsigned from, unsigned 
   to);
  
  I doubt this will work.  These are also used for the -prepare_write
  and -commit_write aops, and the method signature definitively wants
  a file there, even if it's zero..
 
 Oddly enough, I don't see those functions being used in aops:
 
 const struct address_space_operations reiserfs_address_space_operations = {
 .writepage = reiserfs_writepage,
 .readpage = reiserfs_readpage,
 .readpages = reiserfs_readpages,
 .releasepage = reiserfs_releasepage,
 .invalidatepage = reiserfs_invalidatepage,
 .sync_page = block_sync_page,
 .write_begin = reiserfs_write_begin,
 .write_end = reiserfs_write_end,
 .bmap = reiserfs_aop_bmap,
 .direct_IO = reiserfs_direct_IO,
 .set_page_dirty = reiserfs_set_page_dirty,
 };
 
 Plus, reiserfs seems to compile with that patch I just sent.  Sure as
 heck surprised me.
 

That'll be because reiserfs-convert-to-new-aops.patch witched reiserfs over
to -write_begin() and -write_end().

So your stuff becomes dependent on Nick's stuff, and Nick's stuff is still
failing on NFS, I think.


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-27 Thread Andrew Morton
On Thu, 27 Sep 2007 14:51:25 -0700
Andrew Morton [EMAIL PROTECTED] wrote:

  Plus, reiserfs seems to compile with that patch I just sent.  Sure as
  heck surprised me.
  
 
 That'll be because reiserfs-convert-to-new-aops.patch witched reiserfs over
 to -write_begin() and -write_end().

Actually, we should rename reiserfs_prepare_write and reiserfs_commit_write
to something else to reduce confusion.  Probably lots of other filesystems
would benefit from the same change, post-Nick's-stuff.
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH] make reiserfs stop using 'struct file' for internal xattr operations

2007-09-27 Thread Peter Zijlstra

On Thu, 2007-09-27 at 14:51 -0700, Andrew Morton wrote:

 So your stuff becomes dependent on Nick's stuff, and Nick's stuff is still
 failing on NFS, I think.

It worked today, it turned out to be a UML bug. Real hardware seemed to
work properly, but will test a bit more tomorrow.

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/