From: Chandan Rajendra <chandan@linux.vnet.ibm.com>
To: fstests@vger.kernel.org
Cc: Chandan Rajendra <chandan@linux.vnet.ibm.com>,
linux-fsdevel@vger.kernel.org, chandan@mykolab.com
Subject: [RFC PATCH] fiemap-tester.c: Do not error out when FIEMAP_EXTENT_NOT_ALIGNED is set and extent is aligned.
Date: Wed, 15 Apr 2015 18:59:53 +0530 [thread overview]
Message-ID: <1429104593-24136-1-git-send-email-chandan@linux.vnet.ibm.com> (raw)
>From Linux kernel's Documentation/filesystems/fiemap.txt,
* FIEMAP_EXTENT_NOT_ALIGNED
Extent offsets and length are not guaranteed to be block aligned.
So this means that FIEMAP_EXTENT_NOT_ALIGNED is just a hint that indicates
that the extent range could possibly be out of alignment w.r.t to the
filesystem's blocksize. It should still be possible for fiemap ioctl to return
extents with FIEMAP_EXTENT_NOT_ALIGNED flag set (e.g. Inline extents) but
which have blocksize aligned ranges.
Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
---
src/fiemap-tester.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/src/fiemap-tester.c b/src/fiemap-tester.c
index 8e633ab..74dea17 100644
--- a/src/fiemap-tester.c
+++ b/src/fiemap-tester.c
@@ -195,17 +195,6 @@ check_flags(struct fiemap *fiemap, int blocksize)
return -1;
}
- if (extent->fe_flags & FIEMAP_EXTENT_NOT_ALIGNED &&
- aligned_offset == extent->fe_physical &&
- aligned_length == extent->fe_length) {
- printf("ERROR: FIEMAP_EXTENT_NOT_ALIGNED is set but "
- "offset and length is blocksize aligned: "
- "%llu\n",
- (unsigned long long)
- (extent->fe_logical / blocksize));
- return -1;
- }
-
if (extent->fe_flags & FIEMAP_EXTENT_LAST &&
c + 1 < fiemap->fm_mapped_extents) {
printf("ERROR: FIEMAP_EXTENT_LAST is set but there are"
--
2.1.0
next reply other threads:[~2015-04-15 13:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 13:29 Chandan Rajendra [this message]
2015-04-15 23:42 ` [RFC PATCH] fiemap-tester.c: Do not error out when FIEMAP_EXTENT_NOT_ALIGNED is set and extent is aligned 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=1429104593-24136-1-git-send-email-chandan@linux.vnet.ibm.com \
--to=chandan@linux.vnet.ibm.com \
--cc=chandan@mykolab.com \
--cc=fstests@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox