public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Tinguely <tinguely@sgi.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs_io: v7 add the lseek() SEEK_DATA/SEEK_HOLE support
Date: Fri, 23 Aug 2013 10:18:49 -0500	[thread overview]
Message-ID: <52177D59.3000804@sgi.com> (raw)
In-Reply-To: <52177AA0.5080403@sandeen.net>

On 08/23/13 10:07, Eric Sandeen wrote:
> On 8/23/13 9:57 AM, Mark Tinguely wrote:
>> On 08/23/13 08:34, Eric Sandeen wrote:
>>> On Aug 23, 2013, at 8:26 AM, Mark Tinguely<tinguely@sgi.com>   wrote:
>>>
>>>> On 08/22/13 17:45, Eric Sandeen wrote:
>>>>> On 8/22/13 4:31 PM, 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>    seek -h 609k
>>>>>> HOLE    630784
>>>>>>
>>>>>> Signed-off-by: Mark Tinguely<tinguely@sgi.com>
>>>>>> ---
>>>>>>    version 7 or 8 - Eric what number is this?
>>>>>
>>>>> Go for 13, for luck!
>>>>>
>>>>> I think this looks ok, I won't torture you any longer.  If there's anything
>>>>> to fix up when it really gets used in earnest we can do it then.
>>>>>
>>>>> (it crossed my mind that for the "-r" and "-a" invocations it might be good to print
>>>>> out the offset which was sent for each SEEK_* "whence," but *shrug*)
>>>>>
>>>>> Thanks for all the iterations,
>>>>>
>>>>> Reviewed-by: Eric Sandeen<sandeen@redhat.com>
>>>>
>>>> Rich, hold off on commit, I can quickly add the whence. We can see how she sails.
>>>>
>>> Was just an idle thought... See if it makes sense I guess...
>>>
>>> Thanks,
>>> Eric
>>
>>
>> without whence:
>> xfs_io>  seek -ar 0
>> HOLE    0
>> DATA    528384
>> HOLE    532480
>> DATA    819200
>> HOLE    823296
>>
>> xfs_io>  seek -dh 512k
>> HOLE    524288
>> DATA    528384
>>
>> xfs_io>  seek -rd 0
>> DATA    528384
>> DATA    819200
>>
>> ============
>>
>> after with whence:
>
> Don't hate me, but if you do this, now I think it needs a header ;)

I was looking at the output and knew you were going to suggest it.

> I dunno, what do you think, does it have value in general?
>

for -ar no because we are alternating data and hole - the last result is 
the new input. But for all the holes and all the data it is an improvement.

The question is should we print the starting offset in only the "-r" 
option or for all cases to be consistent?

I vote to just add the starting offset in all output...

> I'd propose this:  Merge it as I reviewed it, if you're happy,
> just printing the results of the seeks.

Make sense to have it. Let me post the new version. of course the real 
luck of the irish is with me today, v7 has a bug in it. "wow, I could 
have had a v8".
>
> I was thinking that down the line just for edge case testing
> we might want to be able to pass in other "whences."
>
> Later enhancements could also add a "-w" option to explicitly print
> out the passed-in or recursively-selected "whence" if that output
> is desired for comparisons or sanity checking.
>
> Might be good to stop polishing this for now and do any other
> enhancements in later patches.
>
> Your call,
>
> -Eric
>
>> xfs_io>  seek -ar 0:
>> HOLE    0       0
>> DATA    0       528384
>> HOLE    528384  532480
>> DATA    532480  819200
>> HOLE    819200  823296
>>
>> xfs_io>  seek -dh 512k:
>>
>> HOLE    524288
>> DATA    528384
>>
>> xfs_io>  seek -rd 0
>> DATA    0       528384
>> DATA    532480  819200
>>
>> Seems to make most sense in the case of -rd and -rh
>>
>> --Mark.
>>
>

--Mark.

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

  reply	other threads:[~2013-08-23 15:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22 21:31 [PATCH] xfs_io: v7 add the lseek() SEEK_DATA/SEEK_HOLE support Mark Tinguely
2013-08-22 22:45 ` Eric Sandeen
2013-08-23 13:26   ` Mark Tinguely
2013-08-23 13:28     ` Rich Johnston
2013-08-23 13:34     ` Eric Sandeen
2013-08-23 14:57       ` Mark Tinguely
2013-08-23 15:07         ` Eric Sandeen
2013-08-23 15:18           ` Mark Tinguely [this message]
2013-08-23 15:39             ` Eric Sandeen

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=52177D59.3000804@sgi.com \
    --to=tinguely@sgi.com \
    --cc=sandeen@sandeen.net \
    --cc=xfs@oss.sgi.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