All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Tinguely <tinguely@sgi.com>
To: xfs@oss.sgi.com
Cc: Ben Myers <bpm@sgi.com>
Subject: [PATCH v2] xfsprog: remove duplicate vector memalign from xfs_io
Date: Thu, 27 Sep 2012 07:47:36 -0500	[thread overview]
Message-ID: <20120927124742.695778439@sgi.com> (raw)
In-Reply-To: 20120926220434.GG13214@sgi.com

[-- Attachment #1: v2-xfsprogs-io_remove_duplicate_vector_memalign.patch --]
[-- Type: text/plain, Size: 1153 bytes --]

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.

v2: removed global buffer in __dump_buffer() and use passed buf pointer per
    Ben's detection.

Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
---
 io/pread.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Index: b/io/pread.c
===================================================================
--- a/io/pread.c
+++ b/io/pread.c
@@ -76,8 +76,7 @@ alloc_iovec(
 	buffersize = 0;
 	for (i = 0; i < vectors; i++) {
 		iov[i].iov_base = memalign(pagesize, bsize);
-		buffer = memalign(pagesize, bsize);
-		if (!buffer) {
+		if (!iov[i].iov_base) {
 			perror("memalign");
 			goto unwind;
 		}
@@ -130,7 +129,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);


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  parent reply	other threads:[~2012-09-27 13:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120925142414.660506845@sgi.com>
2012-09-25 14:24 ` [PATCH] xfsprog: remove duplicate vector memalign from xfs_io Mark Tinguely
2012-09-26 22:04   ` Ben Myers
2012-09-26 22:21     ` Mark Tinguely
2012-09-27  0:01     ` Dave Chinner
2012-09-27 14:59       ` Ben Myers
2012-09-27 12:47     ` Mark Tinguely [this message]
2012-09-27 15:05       ` [PATCH v2] " Ben Myers
2012-09-27 22:52       ` Dave Chinner
2012-09-28 16:38         ` Mark Tinguely
2012-09-27  0:00   ` [PATCH] " Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120927124742.695778439@sgi.com \
    --to=tinguely@sgi.com \
    --cc=bpm@sgi.com \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.