From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Tejun Heo <htejun@gmail.com>
Cc: axboe@suse.de, jgarzik@pobox.com, James.Bottomley@steeleye.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH linux-2.6-block:post-2.6.15 08/10] blk: update IDE to use new blk_ordered
Date: Tue, 22 Nov 2005 09:39:46 +0100 [thread overview]
Message-ID: <58cb370e0511220039m40633ab5n3468dee2e38b6128@mail.gmail.com> (raw)
In-Reply-To: <58cb370e0511220036r6e61b509i3bc1f7ce90178b1d@mail.gmail.com>
thinko
On 11/22/05, Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> > > > >> static void ide_cacheflush_p(ide_drive_t *drive)
> > > > >>@@ -1034,6 +993,8 @@ static int ide_disk_remove(struct device
> > > > >> struct ide_disk_obj *idkp = drive->driver_data;
> > > > >> struct gendisk *g = idkp->disk;
> > > > >>
> > > > >>+ blk_queue_ordered(drive->queue, QUEUE_ORDERED_NONE, NULL, 0);
> > > > >>+
> > > > >
> > > > >
> > > > > Shouldn't this be done in ide_disk_release()?
> > > >
> > > > Hmmm... The thing is that, AFAIK, requests are not supposed to be issued
> > > > after ->remove is called (->remove is called only on module unload
> > > > unless hardware is hot-unplugged and HL driver cannot be unloaded while
> > > > it's still opened). I think that's why both sd and ide-disk issue the
> > > > last cache flush in ->remove callbacks but not in ->release.
> > >
> > > Are you sure? I think that only calling del_gendisk() assures you
> > > that there won't be outstanding fs requests?
> > >
> > > I have also noticed bug in ide_disk_remove() - ide_cacheflush_p()
> > > should be called after del_gendisk() - I will fix it later.
> > >
> > > BTW Nowadays you can dynamically dettach/attach driver from/to
> > > device using sysfs interface.
> >
> > I agree that it should go into ->release, but I am still a bit scared
> > about issuing commands in ->release (it might access some data
> > structure which might be gone by then). Also, the correct order seems
> > to be 'turning off ordered' and then 'perform the last cache flush'.
> > So, how about adding blk_queue_ordered right above the last
> > ide_cacheflush_p() now and move both to ->release in a separate patch
> > for both IDE and SCSI?
>
> Not needed, when ide-disk is fixed to call del_gendisk() after
> ide_cacheflush_p(), we can add blk_queue_orderer() before
ide_cacheflush_p() after del_gendisk()
> the latter and then everything should be OK.
blk_queue_ordererd() before ide_cache_flush_p()
:)
next prev parent reply other threads:[~2005-11-22 8:39 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-17 15:36 [PATCH linux-2.6-block:post-2.6.15 00/10] blk: reimplementation of I/O barrier Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 01/10] blk: add @uptodate to end_that_request_last() and @error to rq_end_io_fn() Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 02/10] blk: separate out bio init part from __make_request Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 03/10] blk: reimplement handling of barrier request Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 04/10] blk: update SCSI to use new blk_ordered Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 05/10] blk: add FUA support to SCSI disk Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 06/10] blk: update libata to use new blk_ordered Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 07/10] blk: add FUA support to libata Tejun Heo
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 08/10] blk: update IDE to use new blk_ordered Tejun Heo
2005-11-17 20:11 ` Bartlomiej Zolnierkiewicz
2005-11-18 15:07 ` Tejun Heo
2005-11-18 15:59 ` Bartlomiej Zolnierkiewicz
2005-11-22 2:44 ` Tejun Heo
2005-11-22 8:36 ` Bartlomiej Zolnierkiewicz
2005-11-22 8:39 ` Bartlomiej Zolnierkiewicz [this message]
2005-11-23 7:23 ` Tejun Heo
2005-11-23 8:40 ` Bartlomiej Zolnierkiewicz
2005-11-23 8:46 ` Jens Axboe
2005-11-23 9:00 ` Tejun
2005-11-23 9:05 ` Bartlomiej Zolnierkiewicz
2005-11-17 15:36 ` [PATCH linux-2.6-block:post-2.6.15 09/10] blk: add FUA support to IDE Tejun Heo
2005-11-17 20:39 ` Bartlomiej Zolnierkiewicz
2005-11-18 15:25 ` Tejun Heo
2005-11-18 16:17 ` Bartlomiej Zolnierkiewicz
2005-11-18 17:02 ` Alan Cox
2005-11-18 16:38 ` Bartlomiej Zolnierkiewicz
2005-11-18 17:41 ` Alan Cox
2005-11-24 11:58 ` Tejun Heo
2005-11-24 12:21 ` Tejun Heo
2005-11-24 14:21 ` Bartlomiej Zolnierkiewicz
2005-11-17 15:37 ` [PATCH linux-2.6-block:post-2.6.15 10/10] blk: I/O barrier documentation Tejun Heo
2005-11-17 16:20 ` [PATCH linux-2.6-block:post-2.6.15 00/10] blk: reimplementation of I/O barrier Jeff Garzik
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=58cb370e0511220039m40633ab5n3468dee2e38b6128@mail.gmail.com \
--to=bzolnier@gmail.com \
--cc=James.Bottomley@steeleye.com \
--cc=axboe@suse.de \
--cc=htejun@gmail.com \
--cc=jgarzik@pobox.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
all inboxes | Powered by JetHome®