On Mon, Oct 19, 2009 at 03:00:26PM +0200, Jim Meyering wrote: > While testing support for >512-byte sectors, I noticed that > parted's "print" command displayed an incorrect physical sector size. > This corrects it, but relies on a version of libblkid that is not > yet available even in Fedora rawhide.
The library should be available in Fedora rawhide now. > From 979bf88defcd1411c4c0adf5faa3d4b0e27b4ac4 Mon Sep 17 00:00:00 2001 > From: Jim Meyering <[email protected]> > Date: Thu, 15 Oct 2009 21:29:36 +0200 > Subject: [PATCH] linux: use libblkid to determine ->phys_sector_size > > Before this change, creating a memory-mapped disk on a fedora-based > system running 2.6.31.1-56.fc12.x86_64 using this command: > modprobe scsi_debug dev_size_mb=1025 sector_size=4096 > and then running "parted -s /dev/sdd mklabel gpt print" > would mistakenly print "Sector size (logical/physical): 4096B/512B" > The "512B" is what's wrong. It should be "4096B". > * configure.ac: Test for a new-enough blkid library. > * libparted/Makefile.am (libparted_la_LIBADD): Add $(LIB_BLKID). > * libparted/arch/linux.c (get_minimum_io_size): New function. > (_device_set_sector_size): Use it. > --- > configure.ac | 12 +++++++++ > libparted/Makefile.am | 1 + > libparted/arch/linux.c | 60 > ++++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 73 insertions(+), 0 deletions(-) Looks good. Karel -- Karel Zak <[email protected]> _______________________________________________ parted-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/parted-devel

