From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Saiyam Doshi <saiyamdoshi.in@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: exfat: use bdev_sync function directly where needed
Date: Wed, 02 Oct 2019 15:04:15 -0400 [thread overview]
Message-ID: <9938.1570043055@turing-police> (raw)
In-Reply-To: <20191002151703.GA6594@SD>
[-- Attachment #1: Type: text/plain, Size: 1046 bytes --]
On Wed, 02 Oct 2019 20:47:03 +0530, Saiyam Doshi said:
> fs_sync() is wrapper to bdev_sync(). When fs_sync is called with
> non-zero argument, bdev_sync gets called.
>
> Most instances of fs_sync is called with false and very few with
> true. Refactor this and makes direct call to bdev_sync() where
> needed and removes fs_sync definition.
Did you do an actual analysis of where bdev_sync() *should*
be called?
The note in the TODO was intended to point out that many of the calls
are called with 'false' and probably should not be.
#ifdef CONFIG_EXFAT_DELAYED_SYNC
- fs_sync(sb, false);
fs_set_vol_flags(sb, VOL_CLEAN);
#endif
Consider - with this patch, we are now setting the volume state to clean - but
we've not actually flushed the filesystem to disk, which means it's almost
guaranteed that the file system is *NOT* in fact clean.
Changing all the 'false' that happen before a VOL_CLEAN to 'true' is
probably more correct - but still totally wrong if DELAYED_SYNC isn't defined
because then we *aren't* syncing to disk at all.
[-- Attachment #2: Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2019-10-02 19:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-02 15:17 [PATCH] staging: exfat: use bdev_sync function directly where needed Saiyam Doshi
2019-10-02 19:04 ` Valdis Klētnieks [this message]
2019-10-03 11:46 ` Dan Carpenter
2019-10-03 11:48 ` Dan Carpenter
2019-10-03 11:13 ` Dan Carpenter
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=9938.1570043055@turing-police \
--to=valdis.kletnieks@vt.edu \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=saiyamdoshi.in@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.