* syncing a single fs, and invalidate_bdev()
@ 2010-07-16 21:09 Sage Weil
2010-07-20 14:27 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Sage Weil @ 2010-07-16 21:09 UTC (permalink / raw)
To: linux-fsdevel
Hey,
I'd like to sync a single fs/superblock from userland. sync(2) is too
heavyweight since it syncs all supers. The only thing I see is the
BLKFLSBUF ioctl. That will fsync_bdev() (which does sync the super), and
then does invalidate_bdev().
Is that the right thing to do? Is there any issue with calling
invalidate_bdev() under a running fs? Do any normal block file systems
use the bdev's mapping for non-dirty data?
Thanks-
sage
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: syncing a single fs, and invalidate_bdev()
2010-07-16 21:09 syncing a single fs, and invalidate_bdev() Sage Weil
@ 2010-07-20 14:27 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2010-07-20 14:27 UTC (permalink / raw)
To: Sage Weil; +Cc: linux-fsdevel
Hi,
On Fri 16-07-10 14:09:24, Sage Weil wrote:
> I'd like to sync a single fs/superblock from userland. sync(2) is too
> heavyweight since it syncs all supers. The only thing I see is the
> BLKFLSBUF ioctl. That will fsync_bdev() (which does sync the super), and
> then does invalidate_bdev().
>
> Is that the right thing to do? Is there any issue with calling
> invalidate_bdev() under a running fs? Do any normal block file systems
> use the bdev's mapping for non-dirty data?
BLKFLSBUF is safe under all conditions. The bad thing is that it frees
the caches as well which you may not want. But looking at the code I don't
see a way how to sync a single filesystem in some other way from userspace...
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-20 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-16 21:09 syncing a single fs, and invalidate_bdev() Sage Weil
2010-07-20 14:27 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).