RE: [patch] remove redundant iov segment check

2007-01-02 Thread Chen, Kenneth W
Zach Brown wrote on Tuesday, January 02, 2007 10:22 AM > >> I wonder if it wouldn't be better to make this change as part of a > >> larger change that moves towards an explicit iovec container struct > >> rather than bare 'struct iov *' and 'nr_segs' arguments. > > > I suspect it should be rather

Re: [patch] remove redundant iov segment check

2007-01-02 Thread Zach Brown
I wonder if it wouldn't be better to make this change as part of a larger change that moves towards an explicit iovec container struct rather than bare 'struct iov *' and 'nr_segs' arguments. I suspect it should be rather trivial to get this started. As a first step we simply add a struct iod

Re: [patch] remove redundant iov segment check

2007-01-02 Thread Christoph Hellwig
> I wonder if it wouldn't be better to make this change as part of a > larger change that moves towards an explicit iovec container struct > rather than bare 'struct iov *' and 'nr_segs' arguments. The struct > could have a flag that expressed whether the elements had been > checked. A he

RE: [patch] remove redundant iov segment check

2006-12-04 Thread Chen, Kenneth W
Andrew Morton wrote on Monday, December 04, 2006 11:36 AM > On Mon, 4 Dec 2006 08:26:36 -0800 > "Chen, Kenneth W" <[EMAIL PROTECTED]> wrote: > > > So it's not possible to call down to generic_file_aio_read/write with > > invalid > > iov segment. Patch proposed to delete these redundant code. >

Re: [patch] remove redundant iov segment check

2006-12-04 Thread Zach Brown
> Maybe we should create another internal generic_file_aio_read/write > for in-core function? fs/read_write.c and fs/aio.c are not module-able > and the check is already there. For external module, we can do the > check and then calls down to the internal one. Maybe. I'd rather see fewer moving

RE: [patch] remove redundant iov segment check

2006-12-04 Thread Chen, Kenneth W
Zach Brown wrote on Monday, December 04, 2006 11:19 AM > On Dec 4, 2006, at 8:26 AM, Chen, Kenneth W wrote: > > > The access_ok() and negative length check on each iov segment in > > function > > generic_file_aio_read/write are redundant. They are all already > > checked > > before calling do

Re: [patch] remove redundant iov segment check

2006-12-04 Thread Andrew Morton
On Mon, 4 Dec 2006 08:26:36 -0800 "Chen, Kenneth W" <[EMAIL PROTECTED]> wrote: > So it's not possible to call down to generic_file_aio_read/write with invalid > iov segment. Patch proposed to delete these redundant code. erp, please don't touch that code. The writev deadlock fixes which went in

Re: [patch] remove redundant iov segment check

2006-12-04 Thread Zach Brown
On Dec 4, 2006, at 8:26 AM, Chen, Kenneth W wrote: The access_ok() and negative length check on each iov segment in function generic_file_aio_read/write are redundant. They are all already checked before calling down to these low level generic functions. ... So it's not possible to call