From: Theodore Ts'o <tytso@mit.edu>
To: Rakesh Pandit <rakesh@tuxera.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] filefrag: fix block size value
Date: Sun, 27 Jul 2014 20:28:46 -0400 [thread overview]
Message-ID: <20140728002846.GG6725@thunk.org> (raw)
In-Reply-To: <20140724113850.GA14140@hercules.tuxera.com>
On Thu, Jul 24, 2014 at 02:38:51PM +0300, Rakesh Pandit wrote:
> ioctl(FIGETBSZ) was used to get block size earlier but 2508eaa7
> (filefrag: improvements to filefrag FIEMAP handling) moved to fstatfs
> f_bsize which doesn't work well for many files systems.
>
> Block size returned using fstatfs isn't block size but "optimal
> transfer block size" as per man page. Even stat st_blksize is
> "preferred I/O block size" and in may file systems it may even vary
> from file to file (POSIX). This patch returns back usage of FIGETBSZ
> to get block size. For file systems which don't support FIEMAP, this
> fixes the number of FIBMAP ioctl calls required.
>
> Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Thanks, applied. I added fallback where if FIGETBSZ fails for some
reason, filefrag will now fall back to using f_bsize.
- Ted
prev parent reply other threads:[~2014-07-28 0:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 11:38 [PATCH] filefrag: fix block size value Rakesh Pandit
2014-07-28 0:28 ` Theodore Ts'o [this message]
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=20140728002846.GG6725@thunk.org \
--to=tytso@mit.edu \
--cc=linux-ext4@vger.kernel.org \
--cc=rakesh@tuxera.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).