block: use struct parsed_partitions *state universally in partition check code
authorTejun Heo <tj@kernel.org>
Sat, 15 May 2010 18:09:30 +0000 (20:09 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 21 May 2010 18:01:02 +0000 (20:01 +0200)
commit1493bf217f7f59a5d9e2095a7dbcec00fb36ca8b
tree9c03b0bd903a338d061958f8d65d196b14c81376
parentc3e33e043f5e9c583aa59d5591a614b2a8243d3a
block: use struct parsed_partitions *state universally in partition check code

Make the following changes to partition check code.

* Add ->bdev to struct parsed_partitions.

* Introduce read_part_sector() which is a simple wrapper around
  read_dev_sector() which takes struct parsed_partitions *state
  instead of @bdev.

* For functions which used to take @state and @bdev, drop @bdev.  For
  functions which used to take @bdev, replace it with @state.

* While updating, drop superflous checks on NULL state/bdev in ldm.c.

This cleans up the API a bit and enables better handling of IO errors
during partition check as the generic partition check code now has
much better visibility into what went wrong in the low level code
paths.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ben Hutchings <ben@decadent.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
30 files changed:
fs/partitions/acorn.c
fs/partitions/acorn.h
fs/partitions/amiga.c
fs/partitions/amiga.h
fs/partitions/atari.c
fs/partitions/atari.h
fs/partitions/check.c
fs/partitions/check.h
fs/partitions/efi.c
fs/partitions/efi.h
fs/partitions/ibm.c
fs/partitions/ibm.h
fs/partitions/karma.c
fs/partitions/karma.h
fs/partitions/ldm.c
fs/partitions/ldm.h
fs/partitions/mac.c
fs/partitions/mac.h
fs/partitions/msdos.c
fs/partitions/msdos.h
fs/partitions/osf.c
fs/partitions/osf.h
fs/partitions/sgi.c
fs/partitions/sgi.h
fs/partitions/sun.c
fs/partitions/sun.h
fs/partitions/sysv68.c
fs/partitions/sysv68.h
fs/partitions/ultrix.c
fs/partitions/ultrix.h