Re: [PATCH] drivers/scsi/sd.c: fix uninitialized variable in handling medium errors



On Wed, 2006-04-26 at 16:14 -0700, Andrew Morton wrote:
It'd be nice to have something simple-and-obvious for the
simple-and-obvious -stable maintainers. That's if we think -stable needs
this fixed.

Well .. the original will do for that.

+ int sector_size_div =
+ 512 / SCpnt->device->sector_size;
+ error_sector /= sector_size_div;

You sure about this bit?

Yes. If the <hardware sector size> is < 512 bytes then to convert the
listed error sector to the standard 512 byte sector size block index, we
have to divide (512/<hardware sector size>).

James


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [dm-devel] Re: dm: bio split bvec fix
    ... (Unit of size if the sector - and things don't have to ... guarantee to accept the bio without needing to split it. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: Error using the buffer cache
    ... struct buffer_head *bh; ... sector_t sector = 0; ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: ATA support for 4k sector size
    ... hpa> because logical sector size is visible in most partition formats. ... For each block device you'll get a hardware sector size exposed as well ...
    (Linux-Kernel)
  • Re: [PATCH] make ide-cd handle non-2kB sector sizes
    ... > different hardware sector sizes, ... sector size as well, not just ide-cd. ... Jens Axboe ...
    (Linux-Kernel)
  • Re: [patch] rewrite rd
    ... struct page *page; ... if (!brd_insert_page(brd, sector)) ... More majordomo info at http://vger.kernel.org/majordomo-info.html ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)