From: "bmoon" <bo@anthologysolutions.com>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-raid@vger.kernel.org
Subject: Re: How do we handle the same but uptodated data to disk cache?
Date: Tue, 27 May 2003 13:47:59 -0700 [thread overview]
Message-ID: <007c01c32491$43cf41e0$6b01a8c0@bmoon> (raw)
In-Reply-To: 16082.53674.340479.177651@notabene.cse.unsw.edu.au
Neil,
It improved a lot for the sync I/O.
However, I am looking for a solution to handle
the regular async I/O with a page data on the
same sector repeatedly like writing the MD SB
data to disk without flushing.
The follwing is my simple algorithm for it;
bh=getblk(dev, block, size);
if (buffer_uptodate(bh)) { /* still in cache, not flushed yet */
bh->b_data = "updated data";
brelse(bh);
}
else { /* all were flushed or new */
.
.
mark_buffer_uptodate(bh,1);
mark_buffer_dirty(bh);
generic_make_request(rw, &bh);
}
Please give me your suggestion or comment.
Bo
----- Original Message -----
From: "Neil Brown" <neilb@cse.unsw.edu.au>
To: "bmoon" <bo@anthologysolutions.com>
Cc: <linux-raid@vger.kernel.org>
Sent: Monday, May 26, 2003 7:47 PM
Subject: Re: How do we handle the same but uptodated data to disk cache?
> On Monday May 26, bo@anthologysolutions.com wrote:
> > Hello,
> >
> > I want to write the data to the fixed sector with the same size
frequently
> > just like MD super block, but I do not want to sync and flush the dev
> > on each write.
> >
> > For example, to write md super block in /drivers/md/md.c
>
> I suggest you look at a newer md.c. With 2.4.21pre or 2.5.* have
> "sync_page_io" which does what you want more effectively.
>
> NeilBrown
>
next prev parent reply other threads:[~2003-05-27 20:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-26 23:59 What is the logic behind 'Device or resource busy' ? Jure Pecar
2003-05-27 0:39 ` Joe Pruett
2003-05-27 2:41 ` How do we handle the same but uptodated data to disk cache? bmoon
2003-05-27 2:47 ` Neil Brown
2003-05-27 20:47 ` bmoon [this message]
2003-05-28 20:29 ` bmoon
2003-05-30 4:07 ` Neil Brown
2003-05-27 2:56 ` What is the logic behind 'Device or resource busy' ? Jure Pecar
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='007c01c32491$43cf41e0$6b01a8c0@bmoon' \
--to=bo@anthologysolutions.com \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@cse.unsw.edu.au \
/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