From: Jens Axboe <axboe@suse.de>
To: Constantine Sapuntzakis <csapuntz@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] loop.c: respect bio barrier and sync
Date: Fri, 5 May 2006 16:54:37 +0200 [thread overview]
Message-ID: <20060505145437.GW4324@suse.de> (raw)
In-Reply-To: <ea59786f0605041919w337c7164id5f4e7b3efa818e0@mail.gmail.com>
On Thu, May 04 2006, Constantine Sapuntzakis wrote:
> I believe that the loop block device does not currently respect
> barriers or syncs issued by its clients. As a result, I have seen
> corrupted log errors when a loopback mounted ext3 file system is
> remounted after a hard stop.
>
> The attached patch attempts to fix this problem by respecting the
> barrier and sync flags on the I/O request. The sync_file function was
> cut-and-paste from the implementation of fsync (I think there's no fd
> so I can't call fsync) to allow the patch to be deployed as an updated
> module. Is there another function that could be used?
>
> Comments are welcome. I am not on the list so please cc: me on any
> response..
Please inline your patches, so one can actually comment on them...
- You should handle sync_file() failure. If we don't have !f_op (will
that ever hit, btw?) or ->fsync(), then fail the barrier with
-EOPNOTSUPP. For fsync failure, well... You probably want to just
error the bio with -EIO then.
- bio_sync() doesn't have the semantics you define it to, it is a hint
to the block layer to start request processing instead of plugging. So
don't treat it as a barrier, ignore it.
- Does this work for all loop_device types?
--
Jens Axboe
next prev parent reply other threads:[~2006-05-05 14:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-05 2:19 [PATCH] loop.c: respect bio barrier and sync Constantine Sapuntzakis
2006-05-05 14:54 ` Jens Axboe [this message]
2006-05-05 22:37 ` Constantine Sapuntzakis
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=20060505145437.GW4324@suse.de \
--to=axboe@suse.de \
--cc=csapuntz@gmail.com \
--cc=linux-kernel@vger.kernel.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