xfs
[Top] [All Lists]

Re: [PATCH v3] xfs_io: [v3] add the lseek() SEEK_DATA/SEEK_HOLE support

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH v3] xfs_io: [v3] add the lseek() SEEK_DATA/SEEK_HOLE support
From: Mark Tinguely <tinguely@xxxxxxx>
Date: Fri, 26 Oct 2012 08:31:11 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20121025222914.GE29378@dastard>
References: <20121022213759.033667921@xxxxxxx> <20121022213804.616209844@xxxxxxx> <20121022232931.GD4291@dastard> <20121023200144.515107339@xxxxxxx> <20121025141450.995788000@xxxxxxx> <20121025222914.GE29378@dastard>
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20120122 Thunderbird/9.0
On 10/25/12 17:29, Dave Chinner wrote:
On Thu, Oct 25, 2012 at 09:14:44AM -0500, Mark Tinguely wrote:
Add the lseek SEEK_DATA/SEEK_HOLE support into xfs_io.
The result from the lseek() call will be printed to the output.
For example:

xfs_io>  lseek -h 609k
Type    Offset
hole    630784

v1 ->  v2 Add "-a" and "-r" options.
         Simplify the output.
v2 ->  v3 Refactor for configure.in ->  configure.ac change.
         SEEK_DATA with -1 offset behaves badly on older Linux.
         Display error message as "ERR<errno>".
....
+
+#include<linux/fs.h>

I missed this first time around - why is this include necessary?

Take it out and you will find that it contains the
defines for SEEK_DATA/SEEK_HOLE.

--Mark.

<Prev in Thread] Current Thread [Next in Thread>