From: Andrew Morton <akpm@osdl.org>
To: Junfeng Yang <yjf@stanford.edu>
Cc: lmb@suse.de, linux-kernel@vger.kernel.org,
ext2-devel@lists.sourceforge.net, mc@cs.stanford.edu
Subject: Re: [MC] [CHECKER] Do ext2, jfs and reiserfs respect mount -o sync/dirsync option?
Date: Fri, 4 Mar 2005 15:29:02 -0800 [thread overview]
Message-ID: <20050304152902.60f7c0c7.akpm@osdl.org> (raw)
In-Reply-To: <Pine.GSO.4.44.0503041440030.17155-100000@elaine24.Stanford.EDU>
Junfeng Yang <yjf@stanford.edu> wrote:
>
> > >From a quick parse, ext2 seems to be full of MS_SYNCHRONOUS holes, and
> > there might be some O_SYNC ones there as well.
>
> I should be able to easily add O_SYNC check to FiSC. Several questions:
> 1. Does O_SYNC apply to directory as well?
Only if you can open directores for writing ;)
> 2. For the same file, if I open twice, once with O_SYNC and another time
> without, only writes through the O_SYNC fd will be sychonous, right?
Yes, O_SYNC is a per-fd thing.
> 3. I open a file w/o O_SYNC, issue a bunch of writes, then call
> ioctl(FIOASYNC) to set the fd sync, then issure a second set of writes.
> Only the second set of writes are synchronous?
FIOSYNC is unrelated to O_SYNC. OSYNC can only be set at open().
> btw, man page show that O_DSYNC and O_RSYNC are just O_SYNC. Is this true
> for current linux kernel (2.6)?
The kernel only supports O_SYNC (equivalent behaviour to O_RSYNC|O_DSYNC).
Perhaps glibc does a conversion.
> > So this wild scattergun patch probably does extra work and possibly extra
> > I/O all over the place, but I'd be interested if Junfeng could give it a
> > quick test. It's against 2.6.11.
>
> I checked 2.6.11 with your patch just now. Looks like the problem is
> still there. If you need more information, let me know. Image is at
> http://fisc.stanford.edu/bug2/crash-1.img.bz2. Below is the output from
> e2fsck.
ugh. Thanks.
next prev parent reply other threads:[~2005-03-05 0:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-04 6:33 Junfeng Yang
2005-03-04 7:16 ` Matt Mackall
2005-03-04 7:34 ` Jan Engelhardt
2005-03-04 8:01 ` Junfeng Yang
2005-03-07 17:29 ` Alan Cox
2005-03-07 22:29 ` Junfeng Yang
2005-03-04 8:43 ` [MC] " Junfeng Yang
2005-03-04 9:11 ` Andrew Morton
2005-03-04 9:44 ` Junfeng Yang
2005-03-04 10:27 ` Lars Marowsky-Bree
2005-03-04 11:20 ` Andrew Morton
2005-03-04 23:03 ` Junfeng Yang
2005-03-04 23:29 ` Andrew Morton [this message]
2005-03-08 0:31 ` Bernd Eckenfels
2005-03-19 22:34 ` Florian Weimer
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=20050304152902.60f7c0c7.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lmb@suse.de \
--cc=mc@cs.stanford.edu \
--cc=yjf@stanford.edu \
/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
all inboxes | Powered by JetHome®