From: Jens Axboe <axboe@suse.de>
To: Zhihui Zhang <bf20761@binghamton.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Re-drive buffer head more than once
Date: Fri, 2 May 2003 10:16:34 +0200 [thread overview]
Message-ID: <20030502081633.GC1012@suse.de> (raw)
In-Reply-To: <Pine.SOL.L4.44.0305011246180.28401-100000@bingsun2.cc.binghamton.edu>
On Thu, May 01 2003, Zhihui Zhang wrote:
> Hi,
>
> Is it legal to call general_make_request() more than once on the same bh?
> What will happen if a previous request is still in the queue, or just
> initiated but not finished yet? If I call general_make_request() on the
> same buffer 10 times, does it mean the same buffer will *always* be
> written 10 times on the disk?
It's not legal to call generic_make_request() on a buffer_head, if you
have not acquired the BH_Lock first. The buffer_head will be unlocked on
IO completion, so that basically tells you that you cannot issue more
than _one_ generic_make_request() on a buffer_head.
If you fail to comply with that, then you will basically corrupt the
existing request in the queue where the buffer is attached. You _must_
do a lock_buffer() before calling generic_make_request.
--
Jens Axboe
prev parent reply other threads:[~2003-05-02 8:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-01 16:52 Re-drive buffer head more than once Zhihui Zhang
2003-05-02 8:16 ` Jens Axboe [this message]
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=20030502081633.GC1012@suse.de \
--to=axboe@suse.de \
--cc=bf20761@binghamton.edu \
--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 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.