1. 12 9月, 2013 2 次提交
    • D
      partitions/efi: use lba-aware partition records · c2ebdc24
      Davidlohr Bueso 提交于
      The kernel's GPT implementation currently uses the generic 'struct
      partition' type for dealing with legacy MBR partition records.  While this
      is is useful for disklabels that we designed for CHS addressing, such as
      msdos, it doesn't adapt well to newer standards that use LBA instead, such
      as GUID partition tables.  Furthermore, these generic partition structures
      do not have all the required fields to properly follow the UEFI specs.
      
      While a CHS address can be translated to LBA, it's much simpler and
      cleaner to just replace the partition type.  This patch adds a new
      'gpt_record' type that is fully compliant with EFI and will allow, in the
      next patches, to add more checks to properly verify a protective MBR,
      which is paramount to probing a device that makes use of GPT.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NDavidlohr Bueso <davidlohr@hp.com>
      Reviewed-by: NKarel Zak <kzak@redhat.com>
      Acked-by: NMatt Fleming <matt.fleming@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c2ebdc24
    • C
      block: support embedded device command line partition · bab55417
      Cai Zhiyong 提交于
      Read block device partition table from command line.  The partition used
      for fixed block device (eMMC) embedded device.  It is no MBR, save
      storage space.  Bootloader can be easily accessed by absolute address of
      data on the block device.  Users can easily change the partition.
      
      This code reference MTD partition, source "drivers/mtd/cmdlinepart.c"
      About the partition verbose reference
      "Documentation/block/cmdline-partition.txt"
      
      [akpm@linux-foundation.org: fix printk text]
      [yongjun_wei@trendmicro.com.cn: fix error return code in parse_parts()]
      Signed-off-by: NCai Zhiyong <caizhiyong@huawei.com>
      Cc: Karel Zak <kzak@redhat.com>
      Cc: "Wanglin (Albert)" <albert.wanglin@huawei.com>
      Cc: Marius Groeger <mag@sysgo.de>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Artem Bityutskiy <dedekind@infradead.org>
      Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bab55417
  2. 10 7月, 2013 3 次提交
  3. 30 4月, 2013 1 次提交
  4. 28 2月, 2013 4 次提交
  5. 06 12月, 2012 1 次提交
    • D
      partitions: enable EFI/GPT support by default · 5f6f38db
      Diego Calleja 提交于
      The Kconfig currently enables MSDOS partitions by default because they
      are assumed to be essential, but it's necessary to enable "advanced
      partition selection" in order to get GPT support. IMO GPT partitions
      are becoming common enought to deserve the same treatment MSDOS
      partitions get.
      
      (Side note: I got bit by a disk that had MSDOS and GPT partition
      tables, but for some reason the MSDOS table was different from the
      GPT one. I was stupid enought to disable "advanced partition
      selection" in my .config, which disabled GPT partitioning and made
      my btrfs pool unbootable because it couldn't find the partitions)
      Signed-off-by: NDiego Calleja <diegocg@gmail.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      5f6f38db
  6. 23 11月, 2012 2 次提交
    • S
      block: partition: msdos: provide UUIDs for partitions · d33b98fc
      Stephen Warren 提交于
      The MSDOS/MBR partition table includes a 32-bit unique ID, often referred
      to as the NT disk signature.  When combined with a partition number within
      the table, this can form a unique ID similar in concept to EFI/GPT's
      partition UUID.  Constructing and recording this value in struct
      partition_meta_info allows MSDOS partitions to be referred to on the
      kernel command-line using the following syntax:
      
      root=PARTUUID=0002dd75-01
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Will Drewry <wad@chromium.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      d33b98fc
    • S
      block: store partition_meta_info.uuid as a string · 1ad7e899
      Stephen Warren 提交于
      This will allow other types of UUID to be stored here, aside from true
      UUIDs.  This also simplifies code that uses this field, since it's usually
      constructed from a, used as a, or compared to other, strings.
      
      Note: A simplistic approach here would be to set uuid_str[36]=0 whenever a
      /PARTNROFF option was found to be present.  However, this modifies the
      input string, and causes subsequent calls to devt_from_partuuid() not to
      see the /PARTNROFF option, which causes different results.  In order to
      avoid misleading future maintainers, this parameter is marked const.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Will Drewry <wad@chromium.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      1ad7e899
  7. 26 9月, 2012 1 次提交
    • S
      s390/partitions: make partition detection independent from DASD ioctls · 46e88947
      Stefan Weinhuber 提交于
      In some usage scenarios it is desireable to work with disk images or
      virtualized DASD devices. One problem that prevents such applications
      is the partition detection in ibm.c. Currently it works only for
      devices that support the BIODASDINFO2 ioctl, in other words, it only
      works for devices that belong to the DASD device driver.
      
      The information gained from the BIODASDINFO2 ioctl is only for a small
      set of legacy cases abolutely necessary. All current VOL1, LNX1 and
      CMS1 type of disk labels can be interpreted correctly without this
      information, as long as the generic HDIO_GETGEO ioctl works and
      provides a correct disk geometry.
      
      This patch makes the ibm.c partition detection as independent as
      possible from the BIODASDINFO2 ioctl. Only the following two cases are
      still restricted to real DASDs:
      - An FBA DASD, or LDL formatted ECKD DASD without any disk label.
      - An old style LNX1 label (without large volume support) on a disk
        with inconsistent device geometry.
      Signed-off-by: NStefan Weinhuber <wein@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      46e88947
  8. 16 5月, 2012 1 次提交
  9. 24 2月, 2012 1 次提交
    • A
      LDM: Fix reassembly of extended VBLKs. · 97387e3b
      Anton Altaparmakov 提交于
      From: Ben Hutchings <ben@decadent.org.uk>
      
      Extended VBLKs (those larger than the preset VBLK size) are divided
      into fragments, each with its own VBLK header.  Our LDM implementation
      generally assumes that each VBLK is contiguous in memory, so these
      fragments must be assembled before further processing.
      
      Currently the reassembly seems to be done quite wrongly - no VBLK
      header is copied into the contiguous buffer, and the length of the
      header is subtracted twice from each fragment.  Also the total
      length of the reassembled VBLK is calculated incorrectly.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Signed-off-by: NAnton Altaparmakov <anton@tuxera.com>
      97387e3b
  10. 04 1月, 2012 2 次提交