All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: fsx: fix fallocate logging
@ 2011-08-08 15:55 ` Josef Bacik
  0 siblings, 0 replies; 8+ messages in thread
From: Josef Bacik @ 2011-08-08 15:55 UTC (permalink / raw)
  To: xfs, linux-fsdevel

I've been getting segfaults on fsx tests with btrfs because we're using the
wrong values for the logging with fallocate.  We were using the numbers 1,2 and
3 to indicate the type of preallocate we were doing, however we use these to
point to an array, so obviously array[3] for a 3 element array is wrong, so fix
these to do 0,1, and 2.  Also spit out of we're using KEEP_SIZE in the log to
make it easier to figure out what's going on.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
---
 ltp/fsx.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ltp/fsx.c b/ltp/fsx.c
index 0683853..662af38 100644
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -878,11 +878,11 @@ do_preallocate(unsigned offset, unsigned length)
 
 	/*
 	 * last arg:
-	 * 	1: allocate past EOF
-	 * 	2: extending prealloc
-	 * 	3: interior prealloc
+	 * 	0: allocate past EOF
+	 * 	1: extending prealloc
+	 * 	2: interior prealloc
 	 */
-	log4(OP_FALLOCATE, offset, length, (end_offset > file_size) ? (keep_size ? 1 : 2) : 3);
+	log4(OP_FALLOCATE, offset, length, (end_offset > file_size) ? (keep_size ? 0 : 1) : 2);
 
 	if (end_offset > file_size) {
 		memset(good_buf + file_size, '\0', end_offset - file_size);
@@ -895,7 +895,8 @@ do_preallocate(unsigned offset, unsigned length)
 	if ((progressinterval && testcalls % progressinterval == 0) ||
 	    (debug && (monitorstart == -1 || monitorend == -1 ||
 		      end_offset <= monitorend)))
-		prt("%lu falloc\tfrom 0x%x to 0x%x\n", testcalls, offset, length);
+		prt("%lu falloc\tfrom 0x%x to 0x%x%s\n", testcalls, offset, length,
+		    keep_size ? " (KEEP_SIZE)" : "");
 	if (fallocate(fd, keep_size ? FALLOC_FL_KEEP_SIZE : 0, (loff_t)offset, (loff_t)length) == -1) {
 	        prt("fallocate: %x to %x\n", offset, length);
 		prterr("do_preallocate: fallocate");
-- 
1.7.5.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] xfstests: fsx: fix fallocate logging
@ 2011-08-08 15:55 ` Josef Bacik
  0 siblings, 0 replies; 8+ messages in thread
From: Josef Bacik @ 2011-08-08 15:55 UTC (permalink / raw)
  To: xfs, linux-fsdevel

I've been getting segfaults on fsx tests with btrfs because we're using the
wrong values for the logging with fallocate.  We were using the numbers 1,2 and
3 to indicate the type of preallocate we were doing, however we use these to
point to an array, so obviously array[3] for a 3 element array is wrong, so fix
these to do 0,1, and 2.  Also spit out of we're using KEEP_SIZE in the log to
make it easier to figure out what's going on.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
---
 ltp/fsx.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ltp/fsx.c b/ltp/fsx.c
index 0683853..662af38 100644
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
@@ -878,11 +878,11 @@ do_preallocate(unsigned offset, unsigned length)
 
 	/*
 	 * last arg:
-	 * 	1: allocate past EOF
-	 * 	2: extending prealloc
-	 * 	3: interior prealloc
+	 * 	0: allocate past EOF
+	 * 	1: extending prealloc
+	 * 	2: interior prealloc
 	 */
-	log4(OP_FALLOCATE, offset, length, (end_offset > file_size) ? (keep_size ? 1 : 2) : 3);
+	log4(OP_FALLOCATE, offset, length, (end_offset > file_size) ? (keep_size ? 0 : 1) : 2);
 
 	if (end_offset > file_size) {
 		memset(good_buf + file_size, '\0', end_offset - file_size);
@@ -895,7 +895,8 @@ do_preallocate(unsigned offset, unsigned length)
 	if ((progressinterval && testcalls % progressinterval == 0) ||
 	    (debug && (monitorstart == -1 || monitorend == -1 ||
 		      end_offset <= monitorend)))
-		prt("%lu falloc\tfrom 0x%x to 0x%x\n", testcalls, offset, length);
+		prt("%lu falloc\tfrom 0x%x to 0x%x%s\n", testcalls, offset, length,
+		    keep_size ? " (KEEP_SIZE)" : "");
 	if (fallocate(fd, keep_size ? FALLOC_FL_KEEP_SIZE : 0, (loff_t)offset, (loff_t)length) == -1) {
 	        prt("fallocate: %x to %x\n", offset, length);
 		prterr("do_preallocate: fallocate");
-- 
1.7.5.2

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] xfstests: fsx: fix fallocate logging
  2011-08-08 15:55 ` Josef Bacik
@ 2011-08-09 10:06   ` Dave Chinner
  -1 siblings, 0 replies; 8+ messages in thread
From: Dave Chinner @ 2011-08-09 10:06 UTC (permalink / raw)
  To: Josef Bacik; +Cc: xfs, linux-fsdevel

On Mon, Aug 08, 2011 at 11:55:14AM -0400, Josef Bacik wrote:
> I've been getting segfaults on fsx tests with btrfs because we're using the
> wrong values for the logging with fallocate.  We were using the numbers 1,2 and
> 3 to indicate the type of preallocate we were doing, however we use these to
> point to an array, so obviously array[3] for a 3 element array is wrong, so fix
> these to do 0,1, and 2.  Also spit out of we're using KEEP_SIZE in the log to
> make it easier to figure out what's going on.  Thanks,
> 
> Signed-off-by: Josef Bacik <josef@redhat.com>

Already fixed.

http://git.kernel.org/?p=fs/xfs/xfstests-dev.git;a=commit;h=77c06202484237e26774efbd1774c251b6bef0a9

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] xfstests: fsx: fix fallocate logging
@ 2011-08-09 10:06   ` Dave Chinner
  0 siblings, 0 replies; 8+ messages in thread
From: Dave Chinner @ 2011-08-09 10:06 UTC (permalink / raw)
  To: Josef Bacik; +Cc: linux-fsdevel, xfs

On Mon, Aug 08, 2011 at 11:55:14AM -0400, Josef Bacik wrote:
> I've been getting segfaults on fsx tests with btrfs because we're using the
> wrong values for the logging with fallocate.  We were using the numbers 1,2 and
> 3 to indicate the type of preallocate we were doing, however we use these to
> point to an array, so obviously array[3] for a 3 element array is wrong, so fix
> these to do 0,1, and 2.  Also spit out of we're using KEEP_SIZE in the log to
> make it easier to figure out what's going on.  Thanks,
> 
> Signed-off-by: Josef Bacik <josef@redhat.com>

Already fixed.

http://git.kernel.org/?p=fs/xfs/xfstests-dev.git;a=commit;h=77c06202484237e26774efbd1774c251b6bef0a9

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] xfstests: fsx: fix fallocate logging
  2011-08-09 10:06   ` Dave Chinner
@ 2011-08-09 12:03     ` Josef Bacik
  -1 siblings, 0 replies; 8+ messages in thread
From: Josef Bacik @ 2011-08-09 12:03 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs, linux-fsdevel

On 08/09/2011 06:06 AM, Dave Chinner wrote:
> On Mon, Aug 08, 2011 at 11:55:14AM -0400, Josef Bacik wrote:
>> I've been getting segfaults on fsx tests with btrfs because we're using the
>> wrong values for the logging with fallocate.  We were using the numbers 1,2 and
>> 3 to indicate the type of preallocate we were doing, however we use these to
>> point to an array, so obviously array[3] for a 3 element array is wrong, so fix
>> these to do 0,1, and 2.  Also spit out of we're using KEEP_SIZE in the log to
>> make it easier to figure out what's going on.  Thanks,
>>
>> Signed-off-by: Josef Bacik <josef@redhat.com>
> 
> Already fixed.
> 
> http://git.kernel.org/?p=fs/xfs/xfstests-dev.git;a=commit;h=77c06202484237e26774efbd1774c251b6bef0a9
> 

Damnit, this is what I get for not git pulling first.  Thanks,

Josef

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] xfstests: fsx: fix fallocate logging
@ 2011-08-09 12:03     ` Josef Bacik
  0 siblings, 0 replies; 8+ messages in thread
From: Josef Bacik @ 2011-08-09 12:03 UTC (permalink / raw)
  To: Dave Chinner; +Cc: linux-fsdevel, xfs

On 08/09/2011 06:06 AM, Dave Chinner wrote:
> On Mon, Aug 08, 2011 at 11:55:14AM -0400, Josef Bacik wrote:
>> I've been getting segfaults on fsx tests with btrfs because we're using the
>> wrong values for the logging with fallocate.  We were using the numbers 1,2 and
>> 3 to indicate the type of preallocate we were doing, however we use these to
>> point to an array, so obviously array[3] for a 3 element array is wrong, so fix
>> these to do 0,1, and 2.  Also spit out of we're using KEEP_SIZE in the log to
>> make it easier to figure out what's going on.  Thanks,
>>
>> Signed-off-by: Josef Bacik <josef@redhat.com>
> 
> Already fixed.
> 
> http://git.kernel.org/?p=fs/xfs/xfstests-dev.git;a=commit;h=77c06202484237e26774efbd1774c251b6bef0a9
> 

Damnit, this is what I get for not git pulling first.  Thanks,

Josef

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] xfstests: fsx: fix fallocate logging
  2011-08-09 10:06   ` Dave Chinner
@ 2011-08-14 16:18     ` Christoph Hellwig
  -1 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2011-08-14 16:18 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Josef Bacik, linux-fsdevel, xfs

On Tue, Aug 09, 2011 at 08:06:58PM +1000, Dave Chinner wrote:
> Already fixed.

Note that since these fixes test 091 keeps failing for me. 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] xfstests: fsx: fix fallocate logging
@ 2011-08-14 16:18     ` Christoph Hellwig
  0 siblings, 0 replies; 8+ messages in thread
From: Christoph Hellwig @ 2011-08-14 16:18 UTC (permalink / raw)
  To: Dave Chinner; +Cc: linux-fsdevel, Josef Bacik, xfs

On Tue, Aug 09, 2011 at 08:06:58PM +1000, Dave Chinner wrote:
> Already fixed.

Note that since these fixes test 091 keeps failing for me. 

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-08-14 16:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-08 15:55 [PATCH] xfstests: fsx: fix fallocate logging Josef Bacik
2011-08-08 15:55 ` Josef Bacik
2011-08-09 10:06 ` Dave Chinner
2011-08-09 10:06   ` Dave Chinner
2011-08-09 12:03   ` Josef Bacik
2011-08-09 12:03     ` Josef Bacik
2011-08-14 16:18   ` Christoph Hellwig
2011-08-14 16:18     ` Christoph Hellwig

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.