mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Peter T. Breuer" <ptb@it.uc3m.es>
To: Jens Axboe <axboe@suse.de>
Cc: linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: floppy driver 2.6.3 question
Date: Thu, 18 Mar 2004 13:23:46 +0100 (MET)	[thread overview]
Message-ID: <200403181223.i2ICNkE13506@oboe.it.uc3m.es> (raw)
In-Reply-To: <20040318113506.GL22234@suse.de> from Jens Axboe at "Mar 18, 2004 12:35:07 pm"

"Also sprach Jens Axboe:"
> > The floppy driver doesn't notice if the revalidation bio failed or not,
> > btw (and I don't see an easy way of telling, hence my questions as to
> > what the bi_size and bytes_done "really" mean - I can return them).  I
> > suppose it can tell via the drive hardware what the state is. I also
> > suppose reading the first block somehow triggers some kind of partition
> > revision or other magic?
> 
> One way would be ala the attached, see how bio_endio() clears
> BIO_UPTODATE on error.

Very good. Applied. Thanks!

(do get_bio(&bio) before submit_bio(&bio) and do put_bio(&bio)
afterwards and examine bio.flags&BIO_UPTODATE on return from
wait_for_completion between the two).

> > know.  128 requests have just previously been errored due to readahead
> > and the check_media_changed result setting the driver request function
> > to error out requests.  Perhaps we have run out of requests (they're
> > all put_ as far as I can see). Maybe the block layers get tired of
> > talking to a device that errors requests. I'm just feeling my way!
> > Any wild ideas are welcome!
> 
> If the 129th request fails, then that's a pretty good clue that you
> aren't getting the requests freed. Perhaps you are overwriting something
> in the request after allocating it? Always mask change ->flags (don't
> just set it), and don't overwrite ->rl.

Good idea. rl is inviolate, but I set at least |=REQ_NOMERGE sometimes
on flags. And I pass ioctl information in fake requests by setting
the bit just beyond the edge of those currently used (__REQ_BITS) to
indicate its an ioctl and treating it specially in end request. Maybe
on error I forgot to remove the extra bit before doing put_blk_request
..

WIll look.

Thanks again.

Peter

  reply	other threads:[~2004-03-18 12:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-17 20:02 Peter T. Breuer
2004-03-18  7:14 ` Jens Axboe
2004-03-18  8:23   ` Peter T. Breuer
2004-03-18  9:10     ` Jens Axboe
2004-03-18 10:05       ` Peter T. Breuer
2004-03-18 11:35         ` Jens Axboe
2004-03-18 12:23           ` Peter T. Breuer [this message]
2004-03-18 12:28             ` Jens Axboe
2004-03-18 13:25               ` Peter T. Breuer
2004-03-18 13:31                 ` Jens Axboe
2004-03-18 16:06                   ` Peter T. Breuer
2004-03-18 16:16                     ` Jens Axboe
2004-03-18 18:11                       ` Peter T. Breuer
2004-03-18 19:05                         ` Jens Axboe

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=200403181223.i2ICNkE13506@oboe.it.uc3m.es \
    --to=ptb@it.uc3m.es \
    --cc=axboe@suse.de \
    --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®