Re: [Ecryptfs-devel] [PATCH 3/11] eCryptfs: read_write.c routines

2007-09-25 Thread Michael Halcrow
On Fri, Sep 21, 2007 at 03:05:40PM -0700, Andrew Morton wrote: > btw, I'm not really a great admirer of the whole patchset: it does > some pretty nasty-looking things: allocating dynamic memory, > grabbing the underlying pageframes with virt_to_page(), passing them > back into kernel APIs which are

Re: [PATCH 3/11] eCryptfs: read_write.c routines

2007-09-24 Thread Michael Halcrow
On Wed, Sep 19, 2007 at 10:38:50PM -0700, Andrew Morton wrote: > > + offset = (page_for_lower->index << PAGE_CACHE_SHIFT) + offset_in_page; > > bug. You need to cast page.index to loff_t before shifting. > > I'd fix it on the spot, but this would be a good time to review the > whole patchset a

Re: [Ecryptfs-devel] [PATCH 3/11] eCryptfs: read_write.c routines

2007-09-21 Thread Andrew Morton
On Fri, 21 Sep 2007 16:51:25 -0500 Michael Halcrow <[EMAIL PROTECTED]> wrote: > On Wed, Sep 19, 2007 at 10:38:50PM -0700, Andrew Morton wrote: > > > + virt = kmap(page_for_lower); > > > + rc = ecryptfs_write_lower(ecryptfs_inode, virt, offset, size); > > > + kunmap(page_for_lower); > > > + return

Re: [Ecryptfs-devel] [PATCH 3/11] eCryptfs: read_write.c routines

2007-09-21 Thread Michael Halcrow
On Wed, Sep 19, 2007 at 10:38:50PM -0700, Andrew Morton wrote: > > + virt = kmap(page_for_lower); > > + rc = ecryptfs_write_lower(ecryptfs_inode, virt, offset, size); > > + kunmap(page_for_lower); > > + return rc; > > +} > > argh, kmap. http://lkml.org/lkml/2007/9/15/55 Here is a patch t

Re: [PATCH 3/11] eCryptfs: read_write.c routines

2007-09-19 Thread Andrew Morton
On Mon, 17 Sep 2007 16:46:32 -0500 Michael Halcrow <[EMAIL PROTECTED]> wrote: > Add a set of functions through which all I/O to lower files is > consolidated. This patch adds a new inode_info reference to a > persistent lower file for each eCryptfs inode; another patch later in > this series will

Re: [PATCH 3/11] eCryptfs: read_write.c routines

2007-09-19 Thread Andrew Morton
On Mon, 17 Sep 2007 16:46:32 -0500 Michael Halcrow <[EMAIL PROTECTED]> wrote: > +/** > + * ecryptfs_write_lower > + * @ecryptfs_inode: The eCryptfs inode > + * @data: Data to write > + * @offset: Byte offset in the lower file to which to write the data > + * @size: Number of bytes from @data to wr

[PATCH 3/11] eCryptfs: read_write.c routines

2007-09-17 Thread Michael Halcrow
Add a set of functions through which all I/O to lower files is consolidated. This patch adds a new inode_info reference to a persistent lower file for each eCryptfs inode; another patch later in this series will set that up. This persistent lower file is what the read_write.c functions use to call