Message ID | 1243944761-18673-1-git-send-email-bergwolf@gmail.com |
---|---|
State | Superseded, archived |
Headers | show |
On Tue, Jun 02, 2009 at 08:12:41PM +0800, Peng Tao wrote: > Some ioctl() returns non-negative value on success. filefrag_fiemap should > treat positive ioctl() return values as success. > This can be triggered by running filefrag on btrfs partitions. What does the positive fiemap ioctl return mean? It's not documented in Documentation/filesystems/fiemap.txt. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Jun 2, 2009 at 8:40 PM, Theodore Tso <tytso@mit.edu> wrote: > What does the positive fiemap ioctl return mean? It's not documented > in Documentation/filesystems/fiemap.txt. The positive btrfs_fiemap ioctl return comes from fiemap_fill_next_extent(), which returns 1 to indicate that user-supplied fm_extents array is full according to Documentation/filesystems/fiemap.txt.
diff --git a/misc/filefrag.c b/misc/filefrag.c index 80ac05c..3dc966a 100644 --- a/misc/filefrag.c +++ b/misc/filefrag.c @@ -208,7 +208,7 @@ int filefrag_fiemap(int fd, int blk_shift, int *num_extents) fiemap_incompat_printed = 1; } } - if (rc) + if (rc < 0) return rc; if (!verbose) {
Some ioctl() returns non-negative value on success. filefrag_fiemap should treat positive ioctl() return values as success. This can be triggered by running filefrag on btrfs partitions. Signed-off-by: Peng Tao <bergwolf@gmail.com> --- misc/filefrag.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)