xfs
[Top] [All Lists]

Re: [PATCH] xfsprog: remove duplicate vector memalign from xfs_io

To: Ben Myers <bpm@xxxxxxx>
Subject: Re: [PATCH] xfsprog: remove duplicate vector memalign from xfs_io
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Wed, 26 Sep 2012 17:21:21 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120926220434.GG13214@xxxxxxx>
References: <20120925142414.660506845@xxxxxxx> <20120925142421.398175185@xxxxxxx> <20120926220434.GG13214@xxxxxxx>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 09/26/12 17:04, Ben Myers wrote:
On Tue, Sep 25, 2012 at 09:24:15AM -0500, Mark Tinguely wrote:
The vector feature of xfs_io uses its own memory buffer in the iov structure
and does not use the buffer entry. Remove the duplicate memalign.

Looks to me that there is a usage of buffer in __dump_buffer.  However,
I suspect there shouldn't be.  I suggest (untested,ymmv,ianal,etc):

:!quilt di
Index: xfsprogs/io/pread.c
===================================================================
--- xfsprogs.orig/io/pread.c
+++ xfsprogs/io/pread.c
@@ -130,7 +130,7 @@ __dump_buffer(
         int             i, j;
         char            *p;

-       for (i = 0, p = (char *)buffer; i<  len; i += 16) {
+       for (i = 0, p = (char *)buf; i<  len; i += 16) {
                 char    *s = p;

                 printf("%08llx:  ", (unsigned long long)offset + i);


Otherwise your patch looks good to me.  If I'm not off-my-rocker with
the above you're welcome to pull it in to your patch, or I can submit it
to the list more formally tomorrow.

Reviewed-by: Ben Myers<bpm@xxxxxxx>

Interesting. You are on your rocker, I missed the second bug.

--Mark.



<Prev in Thread] Current Thread [Next in Thread>