public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH/RFC] aiodio: make read_sparse use same mode as writers
Date: Wed, 21 Aug 2013 17:06:24 +0200	[thread overview]
Message-ID: <20130821150624.GA5035@rei> (raw)
In-Reply-To: <92780376.1937886.1377095931551.JavaMail.root@redhat.com>

Hi!
> > I've looked at the test and what it does is:
> > 
> > 1. create file and make sure it's empty
> > 2. truncate it to defined size
> > 3. parent starts writing zeroes to it with O_DIRECT
> > 4. childs reads it and expect to get zeroes at any time
> 
> Hi,
> 
> That looks correct, here's an strace excerpt:
> 
> 04:05:38.464923 open("/tmp/dio_sparse", O_RDWR|O_CREAT|O_EXCL|O_DIRECT, 0600) = 5
> 04:05:38.464985 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f7583c0da10) = 22242
> Process 22242 attached
> [pid 22242] 04:05:38.465142 open("/tmp/dio_sparse", O_RDONLY) = 6
> [pid 22234] 04:05:38.465369 ftruncate(5, 2048 <unfinished ...>
> [pid 22242] 04:05:38.465400 lseek(6, 0, SEEK_SET <unfinished ...>
> [pid 22234] 04:05:38.465458 <... ftruncate resumed> ) = 0
> [pid 22242] 04:05:38.465474 <... lseek resumed> ) = 0
> [pid 22234] 04:05:38.465509 write(5, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096 <unfinished ...>
> [pid 22242] 04:05:38.465540 read(6, "04:05:14.921896 execve(\"./dio_sp"..., 4096) = 2048
> [pid 22242] 04:05:38.482378 fstat(1, {st_mode=S_IFREG|0644, st_size=14502, ...}) = 0
> [pid 22242] 04:05:38.482419 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7583c18000
> [pid 22242] 04:05:38.482473 write(1, "dummy not zero at 0, 0x30\n", 26dummy not zero at 0, 0x30
> ) = 26

So the read gets something that looks like part of the strace? How is
that even possible?

> > This should really work and I've been told by our filesystem guy that
> > this really looks like bug in the kernel (assuming that I haven't
> > overlooked something in the test source).
> 
> Do you know about any doc/source that says why it should work?
> In my search I only came across that man page, which seems to go in
> opposite way.

I simply asked Jan Kara.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2013-08-21 15:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-19 13:38 [LTP] [PATCH/RFC] aiodio: make read_sparse use same mode as writers Jan Stancek
2013-08-20  3:13 ` Wanlong Gao
2013-08-20  6:34   ` Jan Stancek
2013-08-20  6:44     ` Wanlong Gao
2013-08-20  7:06       ` Jan Stancek
2013-08-21 10:24 ` chrubis
2013-08-21 13:41   ` chrubis
     [not found]     ` <92780376.1937886.1377095931551.JavaMail.root@redhat.com>
2013-08-21 15:06       ` chrubis [this message]
     [not found]         ` <1843973614.1971535.1377606877922.JavaMail.root@redhat.com>
2013-08-27 12:58           ` chrubis

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=20130821150624.GA5035@rei \
    --to=chrubis@suse.cz \
    --cc=jstancek@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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