From: Artem Bityutskiy <dedekind1@gmail.com>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: Linux FS Maling List <linux-fsdevel@vger.kernel.org>,
Linux Kernel Maling List <linux-kernel@vger.kernel.org>,
Benny Halevy <bhalevy@tonian.com>,
osd-dev@open-osd.org
Subject: Re: [PATCH] exofs: stop using s_dirt
Date: Tue, 05 Jun 2012 10:35:35 +0300 [thread overview]
Message-ID: <1338881735.2507.36.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <4FCCDE86.4060507@panasas.com>
[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]
On Mon, 2012-06-04 at 19:12 +0300, Boaz Harrosh wrote:
> I have one question though, which I did not understand at the time?
>
> Today at exofs_write_super() we call exofs_sync_fs() (super_operations->sync_fs)
> Who/when calls ->sync_fs() without the ->write_super() below.
Not sure I understood your question correctly, but:
o VFS calls '->sync_fs()' on
* sync(2)
* syncfs(2)
* when unmounting, before calling '->put_super()'
* when re-mounting, before calling '->remount_fs()'
* when freezing (happens when suspending the system)
* when the underlying block device is synced (see 'fsync_bdev()')
o '->write_super()' is called only from one place - from the
'sync_supers()' function (which is only used by the 'sync_supers'
kernel thread) if the superblock is dirty. This thread wakes up every
5 seconds and calls '->write_super()' for all dirty superblocks.
In case of exofs you never set 's_dirt' to non-zero, which means that
'exofs_write_super()' is never called. This means we can remove it and
this won't change anything for exofs.
Basically, in the ideal world where power-cuts and unclean reboots do
not exist, '->write_super()' is not needed because the superblock will
be synced on unmount. The 'write_super()' stuff is about making sure
that your dirty superblock stays dirty only for limited amount of time
(defined via /proc/sys/vm/dirty_writeback_centisecs) and then gets
synced so you have less chances end up with a not completely up-to-date
superblock.
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-06-05 7:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-04 11:48 Artem Bityutskiy
2012-06-04 16:12 ` Boaz Harrosh
2012-06-05 7:35 ` Artem Bityutskiy [this message]
2012-06-05 10:35 ` Artem Bityutskiy
2012-06-05 13:02 ` Boaz Harrosh
2012-06-21 12:29 ` Artem Bityutskiy
2012-06-27 15:49 ` Boaz Harrosh
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=1338881735.2507.36.camel@sauron.fi.intel.com \
--to=dedekind1@gmail.com \
--cc=bhalevy@tonian.com \
--cc=bharrosh@panasas.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=osd-dev@open-osd.org \
/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
Powered by JetHome