All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfstests: fsstress: fix incorrect if condition check for collapse range mode
@ 2014-04-30 10:11 ` Namjae Jeon
  0 siblings, 0 replies; 7+ messages in thread
From: Namjae Jeon @ 2014-04-30 10:11 UTC (permalink / raw)
  To: Dave Chinner; +Cc: linux-fsdevel, Ashish Sangwan, xfs

There is if condition to be block aligned for off and len of Collapse range.
But off and len for all fallocate opearion can be aligned by incorrect
if condition check.

Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
---
 ltp/fsstress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ltp/fsstress.c b/ltp/fsstress.c
index 29fc250..ff9ed12 100644
--- a/ltp/fsstress.c
+++ b/ltp/fsstress.c
@@ -2230,7 +2230,7 @@ do_fallocate(int opno, long r, int mode)
 	 * Collapse range requires off and len to be block aligned, make it
 	 * more likely to be the case.
 	 */
-	if (FALLOC_FL_COLLAPSE_RANGE && (opno % 2)) {
+	if (mode & FALLOC_FL_COLLAPSE_RANGE && (opno % 2)) {
 		off = ((off + stb.st_blksize - 1) & ~(stb.st_blksize - 1));
 		len = ((len + stb.st_blksize - 1) & ~(stb.st_blksize - 1));
 	}
-- 
1.7.11-rc0

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

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

end of thread, other threads:[~2014-04-30 10:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-30 10:11 [PATCH] xfstests: fsstress: fix incorrect if condition check for collapse range mode Namjae Jeon
2014-04-30 10:11 ` Namjae Jeon
2014-04-30 10:26 ` Lukáš Czerner
2014-04-30 10:26   ` Lukáš Czerner
2014-04-30 10:33   ` Namjae Jeon
2014-04-30 10:33     ` Namjae Jeon
2014-04-30 10:43   ` Namjae Jeon

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.