20 Apr, 2008
1 commit
-
Userspace likes to get notified that the disk may have changed, when
rescan_partitions() is called after partitioning or media change. It will
make it possible to update the state of the disk with the "change" event,
before the following partition "add" events are handled.Cc: David Zeuthen
Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
08 Feb, 2008
4 commits
-
Removes the now unused old partition statistic code.
Signed-off-by: Jerome Marchand
Signed-off-by: Jens Axboe -
Reports enhanced partition statistics in sysfs.
Signed-off-by: Jerome Marchand
-
Updates the enhanced partition statistics in generic block layer
besides the disk statistics.Signed-off-by: Jerome Marchand
Signed-off-by: Jens Axboe -
The "whole_disk" attribute was not properly converted in the block
device conversion earlier, and if the file is read, bad things can
happen. This patch fixes this, making the attribute an empty one,
preserving the original functionality.Many thanks to David Miller for finding this, and pointing me in the
proper place within the block code to look.Acked-by: David S. Miller
Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
07 Feb, 2008
1 commit
-
Use DEFAULT_SGI_PARTITION for SGI_PARTION default
Signed-off-by: Thomas Bogendoerfer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Jan, 2008
4 commits
-
There is no need for kobject_unregister() anymore, thanks to Kay's
kobject cleanup changes, so replace all instances of it with
kobject_put().Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
This moves the block devices to /sys/class/block. It will create a
flat list of all block devices, with the disks and partitions in one
directory. For compatibility /sys/block is created and contains symlinks
to the disks./sys/class/block
|-- sda -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
|-- sda1 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
|-- sda10 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10
|-- sda5 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5
|-- sda6 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6
|-- sda7 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7
|-- sda8 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8
|-- sda9 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9
`-- sr0 -> ../../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0/sys/block/
|-- sda -> ../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
`-- sr0 -> ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
Dynamically create the kset instead of declaring it statically. We also
rename block_subsys to block_kset to catch all users of this symbol
with a build error instead of an easy-to-ignore build warning.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman -
kobject_create_and_add is the same as kobject_add_dir, so drop
kobject_add_dir.Cc: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
15 Oct, 2007
1 commit
-
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
13 Oct, 2007
1 commit
-
A number of different drivers incorrect access the kobject name field
directly. This is not correct as the name might not be in the array.
Use the proper accessor function instead.
30 Jul, 2007
2 commits
-
Start doing VTOC validation before using its contents.
The validation is adjusted so as not to break existing setups
that do not set the VTOC version, sanity and partition count entries.
VTOC tables with more than 8 partitions will NOT be used.Signed-off-by: Mark Fortescue
Signed-off-by: David S. Miller -
Correct the Solaris x86 number of partitions (slices) is a way that is
backward compatible with the earlier size.This works without a new VTOC structure definition as the timestamp
and v_asciilabel fields in the VTOC are not used by the kernel yet.Signed-off-by: Mark Fortescue
Signed-off-by: David S. Miller
20 Jul, 2007
1 commit
-
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc).
Here is a short excerpt of the semantic patch performing
this transformation:@@
type T2;
expression x;
identifier f,fld;
expression E;
expression E1,E2;
expression e1,e2,e3,y;
statement S;
@@x =
- kmalloc
+ kzalloc
(E1,E2)
... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\)
- memset((T2)x,0,E1);@@
expression E1,E2,E3;
@@- kzalloc(E1 * E2,E3)
+ kcalloc(E1,E2,E3)[akpm@linux-foundation.org: get kcalloc args the right way around]
Signed-off-by: Yoann Padioleau
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Acked-by: Russell King
Cc: Bryan Wu
Acked-by: Jiri Slaby
Cc: Dave Airlie
Acked-by: Roland Dreier
Cc: Jiri Kosina
Acked-by: Dmitry Torokhov
Cc: Benjamin Herrenschmidt
Acked-by: Mauro Carvalho Chehab
Acked-by: Pierre Ossman
Cc: Jeff Garzik
Cc: "David S. Miller"
Acked-by: Greg KH
Cc: James Bottomley
Cc: "Antonino A. Daplas"
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Jul, 2007
2 commits
-
Teach LDM about a new field encountered with Windows Vista.
This fixes LDM for people using Vista who have disabled drive letter
assignment from one or more volumes. Doing this introduces a so far
unknown field in the LDM database in the VOL5 VBLK structure which
causes the LDM driver to fail to parse the VBLK structure and hence LDM
fails to parse the disk altogether. This patch teaches the driver about
this field.Thanks got to Ashton Mills for reporting the
problem and working with me on getting it fixed. It is now working for
him.Signed-off-by: Anton Altaparmakov
CC: Richard Russon
Signed-off-by: Linus Torvalds -
warning: 'adfs_partition' defined but not used
warning: 'riscix_partition' defined but not used
warning: 'linux_partition' defined but not usedSigned-off-by: Denver Gingerich
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Jul, 2007
1 commit
-
sysfs is now completely out of driver/module lifetime game. After
deletion, a sysfs node doesn't access anything outside sysfs proper,
so there's no reason to hold onto the attribute owners. Note that
often the wrong modules were accounted for as owners leading to
accessing removed modules.This patch kills now unnecessary attribute->owner. Note that with
this change, userland holding a sysfs node does not prevent the
backing module from being unloaded.For more info regarding lifetime rule cleanup, please read the
following message.http://article.gmane.org/gmane.linux.kernel/510293
(tweaked by Greg to not delete the field just yet, to make it easier to
merge things properly.)Signed-off-by: Tejun Heo
Cc: Cornelia Huck
Cc: Andrew Morton
Signed-off-by: Greg Kroah-Hartman
10 Jul, 2007
1 commit
-
CDL formated DASDs are now detected correctly even if no VOL1 label is
on the disk. This prevents possible loss of data.Signed-off-by: Stefan Haberland
Signed-off-by: Martin Schwidefsky
22 May, 2007
2 commits
-
This from a "tested" patch...
Signed-off-by: Jeff Garzik
Cc: Anton Altaparmakov
Signed-off-by: Linus Torvalds -
This fixes the LDM driver so that it works with Windows Vista dynamic
disks which are subtly different to Windows 2000/XP ones.The patch was needed to get a Vista formatted dynamic disk to be
recognized and parsed successfully.Thanks go to Chris Teachworth for the report and testing.
Cc: Richard Russon
Signed-off-by: Anton Altaparmakov
Signed-off-by: Linus Torvalds
11 May, 2007
2 commits
-
Remove unused argument in is_pmbr_valid()
Remove unneeded initialization of local variable legacy_mbrSigned-off-by: Olaf Hering
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Don't enable SYSV68 partition table support on all m68k boxes by default,
only on Motorola VME boards.Signed-off-by: Geert Uytterhoeven
Cc: Philippe De Muyter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 May, 2007
1 commit
-
Add support for the Motorola sysv68 disk partition (slices in motorola
doc).Signed-off-by: Philippe De Muyter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 May, 2007
3 commits
-
invalidate_bdev() is superfluous when truncate_inode_pages() is also
called. do call invalidate_bh_lrus() though, to avoid stale pointers.Signed-off-by: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove the destroy_dirty_buffers argument from invalidate_bdev(), it hasn't
been used in 6 years (so akpm says).find * -name \*.[ch] | xargs grep -l invalidate_bdev |
while read file; do
quilt add $file;
sed -ie 's/invalidate_bdev(\([^,]*\),[^)]*)/invalidate_bdev(\1)/g' $file;
doneSigned-off-by: Peter Zijlstra
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Ensure pages are uptodate after returning from read_cache_page, which allows
us to cut out most of the filesystem-internal PageUptodate calls.I didn't have a great look down the call chains, but this appears to fixes 7
possible use-before uptodate in hfs, 2 in hfsplus, 1 in jfs, a few in
ecryptfs, 1 in jffs2, and a possible cleared data overwritten with readpage in
block2mtd. All depending on whether the filler is async and/or can return
with a !uptodate page.Signed-off-by: Nick Piggin
Cc: Hugh Dickins
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 May, 2007
1 commit
-
We need to work on cleaning up the relationship between kobjects, ksets and
ktypes. The removal of 'struct subsystem' is the first step of this,
especially as it is not really needed at all.Thanks to Kay for fixing the bugs in this patch.
Signed-off-by: Greg Kroah-Hartman
17 Mar, 2007
2 commits
-
Remove the misleading "Presently only useful on the IA-64 platform" text
from the EFI partition Kconfig.EFI partitions are also used by Apple on their Intel-based machines and
thus you need EFI partition support if you (for example) want to attach
such a machine in target disk mode.Signed-off-by: Johannes Berg
Acked-by: Matt Domsch
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The only error code which comes from the partition checkers is -1, when
they finds an EIO. As per the discussion, ENOMEM values were ignored,
as they might scare the users.So, with the current code, we end up returning -1 and not EIO for the
ioctl() calls. Which doesn't give any clue to the user of what went
wrong.Signed-off-by: Suzuki K P
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Mar, 2007
1 commit
-
Fix inverted check introduced in 57881dd9df40b76dc7fc6a0d13fd75f337accb32 "Fix
check_partition routines".Signed-off-by: Suzuki K P
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Feb, 2007
1 commit
-
Here is a patch that removes all redundant kobject_unregister argument checks.
Signed-off-by: Mariusz Kozlowski
Signed-off-by: Greg Kroah-Hartman
12 Feb, 2007
3 commits
-
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Update defconfig.
[SPARC64]: Add PCI MSI support on Niagara.
[SPARC64] IRQ: Use irq_desc->chip_data instead of irq_desc->handler_data
[SPARC64]: Add obppath sysfs attribute for SBUS and PCI devices.
[PARTITION]: Add whole_disk attribute. -
Correct the AIX magic check to let 'echo > /dev/sdb' actually work.
Signed-off-by: Olaf Hering
Cc: OGAWA Hirofumi
Cc: Anton Blanchard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The patch to identify AIX disks and ignore them has caused at least one
machine to fail to find the root partition on 2.6.19. The patch is:http://lkml.org/lkml/2006/7/31/117
The problem is some disk formatters do not blow away the first 4 bytes
of the disk. If the disk we are installing to used to have AIX on it,
then the first 4 bytes will still have IBMA in EBCDIC.The install in question was debian etch. Im not sure what the best fix
is, perhaps the AIX detection code could check more than the first 4
bytes.The whole partition info for primary partitions is in this block:
dd if=/dev/sdb count=$(( 4 * 16 )) bs=1 skip=$(( 0x1be ))
All other data do not matter, beside the 0x55aa marker at the end of the
first block.Signed-off-by: Olaf Hering
Cc: OGAWA Hirofumi
Cc: Anton Blanchard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
11 Feb, 2007
1 commit
-
Some partitioning systems create special partitions that
span the entire disk. One example are Sun partitions, and
this whole-disk partition exists to tell the firmware the
extent of the entire device so it can load the boot block
and do other things.Such partitions should not be treated as normal partitions,
because all the other partitions overlap this whole-disk one.
So we'd see multiple instances of the same UUID etc. which
we do not want. udev and friends can thus search for this
'whole_disk' attribute and use it to decide to ignore the
partition.Signed-off-by: Fabio Massimo Di Nitto
Signed-off-by: David S. Miller
09 Dec, 2006
2 commits
-
Signed-off-by: Thomas Bogendoerfer
Signed-off-by: Ralf Baechle -
This patch provides fault-injection capability for disk IO.
Boot option:
fail_make_request=,,,
-- specifies the interval of failures.
-- specifies how often it should fail in percent.
-- specifies the size of free space where disk IO can be issued
safely in bytes.-- specifies how many times failures may happen at most.
Debugfs:
/debug/fail_make_request/interval
/debug/fail_make_request/probability
/debug/fail_make_request/specifies
/debug/fail_make_request/timesExample:
fail_make_request=10,100,0,-1
echo 1 > /sys/blocks/hda/hda1/make-it-failgeneric_make_request() on /dev/hda1 fails once per 10 times.
Cc: Jens Axboe
Signed-off-by: Akinobu Mita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Dec, 2006
2 commits
-
check_partition() stops its probe once it hits an I/O error from the
partition checkers. This would prevent the actual partition checker
getting a chance to verify the partition.So this patch lets check_partition() continue probing untill it hits a
success while recording the I/O error which might have been reported by the
checking routines.Also, it does some cleanup of the partition methods for ibm, atari and
amiga to return -1 upon hitting an I/O error.Signed-off-by: Suzuki K P
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The current rescan_partition implementation ignores the errors that comes from
the lower layer. It reports success for unknown partitions as well as I/O
error cases while reading the partition information.The unknown partition is not (and will not be) considered as an error in the
kernel, since there are legal users of it (e.g, members of a RAID5 MD Device
or a new disk which is not partitioned at all ). Changing this behaviour
would scare the user about a serious problem with their disk and is not
recommended. Thus for both "unknown partitions" to the Linux (eg., DEC
VMS,Novell Netware) and the legal users of NULL partition, would still be
reported as "SUCCESS".The patch attached here, scares the user about something which he does need to
worry about. i.e, returning -EIO on disk I/O errors while reading the
partition information.Signed-off-by: Suzuki K P
Cc: Erik Mouw
Cc: Christoph Hellwig
Cc: Al Viro
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds