Re: [patch] aio: make aio_ring_info->nr_pages an unsigned int

2007-01-02 Thread Zach Brown


I had that changes earlier, but dropped it to make the patch smaller.


Still have it kicking around?

Making this stuff more consistent would be nice, I agree, I'm just  
not sure it's worth the risk of running into some subtle bugs.


- z
-
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: [patch] aio: make aio_ring_info->nr_pages an unsigned int

2007-01-02 Thread Chen, Kenneth W
Zach Brown wrote on Tuesday, January 02, 2007 5:14 PM
> To: Chen, Kenneth W
> > --- ./include/linux/aio.h.orig  2006-12-24 22:31:55.0 -0800
> > +++ ./include/linux/aio.h   2006-12-24 22:41:28.0 -0800
> > @@ -165,7 +165,7 @@ struct aio_ring_info {
> >
> > struct page **ring_pages;
> > spinlock_t  ring_lock;
> > -   longnr_pages;
> > +   unsignednr_pages;
> >
> > unsignednr, tail;
> 
> Hmm.
> 
> This seems so trivial as to not be worth it.  It'd be more compelling  
> if it was more thorough -- doing things like updating the 'long i'  
> iterators that a feww have over ->nr_pages.  That kind of thing.   
> Giving some confidence that the references of ->nr_pages were audited.


I had that changes earlier, but dropped it to make the patch smaller. It
all started with head and tail index, which is defined as unsigned int in
structure, but in aio.c, all local variables that does temporary head and
tail calculation are unsigned long. While cleaning that, it got expanded
into nr_pages etc.  Oh well.

- Ken

-
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: [patch] aio: make aio_ring_info->nr_pages an unsigned int

2007-01-02 Thread Zach Brown

--- ./include/linux/aio.h.orig  2006-12-24 22:31:55.0 -0800
+++ ./include/linux/aio.h   2006-12-24 22:41:28.0 -0800
@@ -165,7 +165,7 @@ struct aio_ring_info {

struct page **ring_pages;
spinlock_t  ring_lock;
-   longnr_pages;
+   unsignednr_pages;

unsignednr, tail;




Hmm.

This seems so trivial as to not be worth it.  It'd be more compelling  
if it was more thorough -- doing things like updating the 'long i'  
iterators that a feww have over ->nr_pages.  That kind of thing.   
Giving some confidence that the references of ->nr_pages were audited.


- z
-
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: [patch] aio: make aio_ring_info-nr_pages an unsigned int

2007-01-02 Thread Zach Brown

--- ./include/linux/aio.h.orig  2006-12-24 22:31:55.0 -0800
+++ ./include/linux/aio.h   2006-12-24 22:41:28.0 -0800
@@ -165,7 +165,7 @@ struct aio_ring_info {

struct page **ring_pages;
spinlock_t  ring_lock;
-   longnr_pages;
+   unsignednr_pages;

unsignednr, tail;




Hmm.

This seems so trivial as to not be worth it.  It'd be more compelling  
if it was more thorough -- doing things like updating the 'long i'  
iterators that a feww have over -nr_pages.  That kind of thing.   
Giving some confidence that the references of -nr_pages were audited.


- z
-
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: [patch] aio: make aio_ring_info-nr_pages an unsigned int

2007-01-02 Thread Chen, Kenneth W
Zach Brown wrote on Tuesday, January 02, 2007 5:14 PM
 To: Chen, Kenneth W
  --- ./include/linux/aio.h.orig  2006-12-24 22:31:55.0 -0800
  +++ ./include/linux/aio.h   2006-12-24 22:41:28.0 -0800
  @@ -165,7 +165,7 @@ struct aio_ring_info {
 
  struct page **ring_pages;
  spinlock_t  ring_lock;
  -   longnr_pages;
  +   unsignednr_pages;
 
  unsignednr, tail;
 
 Hmm.
 
 This seems so trivial as to not be worth it.  It'd be more compelling  
 if it was more thorough -- doing things like updating the 'long i'  
 iterators that a feww have over -nr_pages.  That kind of thing.   
 Giving some confidence that the references of -nr_pages were audited.


I had that changes earlier, but dropped it to make the patch smaller. It
all started with head and tail index, which is defined as unsigned int in
structure, but in aio.c, all local variables that does temporary head and
tail calculation are unsigned long. While cleaning that, it got expanded
into nr_pages etc.  Oh well.

- Ken

-
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: [patch] aio: make aio_ring_info-nr_pages an unsigned int

2007-01-02 Thread Zach Brown


I had that changes earlier, but dropped it to make the patch smaller.


Still have it kicking around?

Making this stuff more consistent would be nice, I agree, I'm just  
not sure it's worth the risk of running into some subtle bugs.


- z
-
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/