Re: [PATCH 7/13] i386 sg: add support for chaining scatterlists

2007-05-10 Thread Jens Axboe
On Thu, May 10 2007, Benny Halevy wrote: > Jens Axboe wrote: > > +#define sg_is_chain(sg)((unsigned long) (sg)->page & 0x01) > > +#define sg_chain_ptr(sg) \ > > + ((struct scatterlist *) ((unsigned long) (sg)->page & ~0x01)) > > + > > +/* > > + * We overload the meaning of ->page fo

Re: [PATCH 7/13] i386 sg: add support for chaining scatterlists

2007-05-10 Thread Jens Axboe
On Thu, May 10 2007, Andrew Morton wrote: > On Thu, 10 May 2007 12:46:53 +0200 Jens Axboe <[EMAIL PROTECTED]> wrote: > > > On Thu, May 10 2007, Jens Axboe wrote: > > > Yeah, I'm inclined to agree. Perhaps it would be better to put this > > > stuff in lib/scatterlist.c or something like that instea

Re: [PATCH 7/13] i386 sg: add support for chaining scatterlists

2007-05-10 Thread Benny Halevy
Jens Axboe wrote: > +#define sg_is_chain(sg) ((unsigned long) (sg)->page & 0x01) > +#define sg_chain_ptr(sg) \ > + ((struct scatterlist *) ((unsigned long) (sg)->page & ~0x01)) > + > +/* > + * We overload the meaning of ->page for sg chaining. If the LSB is > + * set, the page

Re: [PATCH 7/13] i386 sg: add support for chaining scatterlists

2007-05-10 Thread Andrew Morton
On Thu, 10 May 2007 12:46:53 +0200 Jens Axboe <[EMAIL PROTECTED]> wrote: > On Thu, May 10 2007, Jens Axboe wrote: > > Yeah, I'm inclined to agree. Perhaps it would be better to put this > > stuff in lib/scatterlist.c or something like that instead? > > > > > > +/* > > > > + * Chain previous sglis

Re: [PATCH 7/13] i386 sg: add support for chaining scatterlists

2007-05-10 Thread Jens Axboe
On Thu, May 10 2007, Jens Axboe wrote: > Yeah, I'm inclined to agree. Perhaps it would be better to put this > stuff in lib/scatterlist.c or something like that instead? > > > > +/* > > > + * Chain previous sglist to this one > > > + */ > > > +static inline void sg_chain(struct scatterlist *prv, u

Re: [PATCH 7/13] i386 sg: add support for chaining scatterlists

2007-05-10 Thread Jens Axboe
On Thu, May 10 2007, Andrew Morton wrote: > On Thu, 10 May 2007 12:21:49 +0200 Jens Axboe <[EMAIL PROTECTED]> wrote: > > > The core of the patch - allow the last sg element in a scatterlist > > table to point to the start of a new table. We overload the LSB of > > the page pointer to indicate whet

Re: [PATCH 7/13] i386 sg: add support for chaining scatterlists

2007-05-10 Thread Andrew Morton
On Thu, 10 May 2007 12:21:49 +0200 Jens Axboe <[EMAIL PROTECTED]> wrote: > The core of the patch - allow the last sg element in a scatterlist > table to point to the start of a new table. We overload the LSB of > the page pointer to indicate whether this is a valid sg entry, or > merely a link to