diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 15:19:57 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-08 15:19:57 -0500 |
| commit | 972b2c719990f91eb3b2310d44ef8a2d38955a14 (patch) | |
| tree | b25a250ec5bec4b7b6355d214642d8b57c5cab32 /block | |
| parent | 02550d61f49266930e674286379d3601006b2893 (diff) | |
| parent | c3aa077648e147783a7a53b409578234647db853 (diff) | |
Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
reiserfs: Properly display mount options in /proc/mounts
vfs: prevent remount read-only if pending removes
vfs: count unlinked inodes
vfs: protect remounting superblock read-only
vfs: keep list of mounts for each superblock
vfs: switch ->show_options() to struct dentry *
vfs: switch ->show_path() to struct dentry *
vfs: switch ->show_devname() to struct dentry *
vfs: switch ->show_stats to struct dentry *
switch security_path_chmod() to struct path *
vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
vfs: trim includes a bit
switch mnt_namespace ->root to struct mount
vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
vfs: opencode mntget() mnt_set_mountpoint()
vfs: spread struct mount - remaining argument of next_mnt()
vfs: move fsnotify junk to struct mount
vfs: move mnt_devname
vfs: move mnt_list to struct mount
vfs: switch pnode.h macros to struct mount *
...
Diffstat (limited to 'block')
38 files changed, 6071 insertions, 6 deletions
diff --git a/block/Kconfig b/block/Kconfig index e97934eececa..09acf1b39905 100644 --- a/block/Kconfig +++ b/block/Kconfig | |||
| @@ -99,6 +99,12 @@ config BLK_DEV_THROTTLING | |||
| 99 | 99 | ||
| 100 | See Documentation/cgroups/blkio-controller.txt for more information. | 100 | See Documentation/cgroups/blkio-controller.txt for more information. |
| 101 | 101 | ||
| 102 | menu "Partition Types" | ||
| 103 | |||
| 104 | source "block/partitions/Kconfig" | ||
| 105 | |||
| 106 | endmenu | ||
| 107 | |||
| 102 | endif # BLOCK | 108 | endif # BLOCK |
| 103 | 109 | ||
| 104 | config BLOCK_COMPAT | 110 | config BLOCK_COMPAT |
diff --git a/block/Makefile b/block/Makefile index 514c6e4f427a..39b76ba66ffd 100644 --- a/block/Makefile +++ b/block/Makefile | |||
| @@ -5,7 +5,8 @@ | |||
| 5 | obj-$(CONFIG_BLOCK) := elevator.o blk-core.o blk-tag.o blk-sysfs.o \ | 5 | obj-$(CONFIG_BLOCK) := elevator.o blk-core.o blk-tag.o blk-sysfs.o \ |
| 6 | blk-flush.o blk-settings.o blk-ioc.o blk-map.o \ | 6 | blk-flush.o blk-settings.o blk-ioc.o blk-map.o \ |
| 7 | blk-exec.o blk-merge.o blk-softirq.o blk-timeout.o \ | 7 | blk-exec.o blk-merge.o blk-softirq.o blk-timeout.o \ |
| 8 | blk-iopoll.o blk-lib.o ioctl.o genhd.o scsi_ioctl.o | 8 | blk-iopoll.o blk-lib.o ioctl.o genhd.o scsi_ioctl.o \ |
| 9 | partition-generic.o partitions/ | ||
| 9 | 10 | ||
| 10 | obj-$(CONFIG_BLK_DEV_BSG) += bsg.o | 11 | obj-$(CONFIG_BLK_DEV_BSG) += bsg.o |
| 11 | obj-$(CONFIG_BLK_DEV_BSGLIB) += bsg-lib.o | 12 | obj-$(CONFIG_BLK_DEV_BSGLIB) += bsg-lib.o |
diff --git a/block/bsg.c b/block/bsg.c index 702f1316bb8f..9651ec7b87c2 100644 --- a/block/bsg.c +++ b/block/bsg.c | |||
| @@ -1070,7 +1070,7 @@ EXPORT_SYMBOL_GPL(bsg_register_queue); | |||
| 1070 | 1070 | ||
| 1071 | static struct cdev bsg_cdev; | 1071 | static struct cdev bsg_cdev; |
| 1072 | 1072 | ||
| 1073 | static char *bsg_devnode(struct device *dev, mode_t *mode) | 1073 | static char *bsg_devnode(struct device *dev, umode_t *mode) |
| 1074 | { | 1074 | { |
| 1075 | return kasprintf(GFP_KERNEL, "bsg/%s", dev_name(dev)); | 1075 | return kasprintf(GFP_KERNEL, "bsg/%s", dev_name(dev)); |
| 1076 | } | 1076 | } |
diff --git a/block/genhd.c b/block/genhd.c index 02e9fca80825..83e7c04015e1 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
| 16 | #include <linux/kmod.h> | 16 | #include <linux/kmod.h> |
| 17 | #include <linux/kobj_map.h> | 17 | #include <linux/kobj_map.h> |
| 18 | #include <linux/buffer_head.h> | ||
| 19 | #include <linux/mutex.h> | 18 | #include <linux/mutex.h> |
| 20 | #include <linux/idr.h> | 19 | #include <linux/idr.h> |
| 21 | #include <linux/log2.h> | 20 | #include <linux/log2.h> |
| @@ -507,7 +506,7 @@ static int exact_lock(dev_t devt, void *data) | |||
| 507 | return 0; | 506 | return 0; |
| 508 | } | 507 | } |
| 509 | 508 | ||
| 510 | void register_disk(struct gendisk *disk) | 509 | static void register_disk(struct gendisk *disk) |
| 511 | { | 510 | { |
| 512 | struct device *ddev = disk_to_dev(disk); | 511 | struct device *ddev = disk_to_dev(disk); |
| 513 | struct block_device *bdev; | 512 | struct block_device *bdev; |
| @@ -1109,7 +1108,7 @@ struct class block_class = { | |||
| 1109 | .name = "block", | 1108 | .name = "block", |
| 1110 | }; | 1109 | }; |
| 1111 | 1110 | ||
| 1112 | static char *block_devnode(struct device *dev, mode_t *mode) | 1111 | static char *block_devnode(struct device *dev, umode_t *mode) |
| 1113 | { | 1112 | { |
| 1114 | struct gendisk *disk = dev_to_disk(dev); | 1113 | struct gendisk *disk = dev_to_disk(dev); |
| 1115 | 1114 | ||
diff --git a/block/ioctl.c b/block/ioctl.c index d510c2a4eff8..4828fa349813 100644 --- a/block/ioctl.c +++ b/block/ioctl.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include <linux/blkpg.h> | 5 | #include <linux/blkpg.h> |
| 6 | #include <linux/hdreg.h> | 6 | #include <linux/hdreg.h> |
| 7 | #include <linux/backing-dev.h> | 7 | #include <linux/backing-dev.h> |
| 8 | #include <linux/buffer_head.h> | 8 | #include <linux/fs.h> |
| 9 | #include <linux/blktrace_api.h> | 9 | #include <linux/blktrace_api.h> |
| 10 | #include <asm/uaccess.h> | 10 | #include <asm/uaccess.h> |
| 11 | 11 | ||
diff --git a/block/partition-generic.c b/block/partition-generic.c new file mode 100644 index 000000000000..d06ec1c829c2 --- /dev/null +++ b/block/partition-generic.c | |||
| @@ -0,0 +1,537 @@ | |||
| 1 | /* | ||
| 2 | * Code extracted from drivers/block/genhd.c | ||
| 3 | * Copyright (C) 1991-1998 Linus Torvalds | ||
| 4 | * Re-organised Feb 1998 Russell King | ||
| 5 | * | ||
| 6 | * We now have independent partition support from the | ||
| 7 | * block drivers, which allows all the partition code to | ||
| 8 | * be grouped in one location, and it to be mostly self | ||
| 9 | * contained. | ||
| 10 | */ | ||
| 11 | |||
| 12 | #include <linux/init.h> | ||
| 13 | #include <linux/module.h> | ||
| 14 | #include <linux/fs.h> | ||
| 15 | #include <linux/slab.h> | ||
| 16 | #include <linux/kmod.h> | ||
| 17 | #include <linux/ctype.h> | ||
| 18 | #include <linux/genhd.h> | ||
| 19 | #include <linux/blktrace_api.h> | ||
| 20 | |||
| 21 | #include "partitions/check.h" | ||
| 22 | |||
| 23 | #ifdef CONFIG_BLK_DEV_MD | ||
| 24 | extern void md_autodetect_dev(dev_t dev); | ||
| 25 | #endif | ||
| 26 | |||
| 27 | /* | ||
| 28 | * disk_name() is used by partition check code and the genhd driver. | ||
| 29 | * It formats the devicename of the indicated disk into | ||
| 30 | * the supplied buffer (of size at least 32), and returns | ||
| 31 | * a pointer to that same buffer (for convenience). | ||
| 32 | */ | ||
| 33 | |||
| 34 | char *disk_name(struct gendisk *hd, int partno, char *buf) | ||
| 35 | { | ||
| 36 | if (!partno) | ||
| 37 | snprintf(buf, BDEVNAME_SIZE, "%s", hd->disk_name); | ||
| 38 | else if (isdigit(hd->disk_name[strlen(hd->disk_name)-1])) | ||
| 39 | snprintf(buf, BDEVNAME_SIZE, "%sp%d", hd->disk_name, partno); | ||
| 40 | else | ||
| 41 | snprintf(buf, BDEVNAME_SIZE, "%s%d", hd->disk_name, partno); | ||
| 42 | |||
| 43 | return buf; | ||
| 44 | } | ||
| 45 | |||
| 46 | const char *bdevname(struct block_device *bdev, char *buf) | ||
