12 May, 2017
1 commit
-
Similar to what blk_get_device_part_str() does, this patch makes
part_get_info_by_name() return the partition number in case of a match.
This is useful when the partition number is needed and not just the
descriptor.Signed-off-by: Alex Deymo
Reviewed-by: Simon Glass
28 Jan, 2017
6 commits
-
We convert CONFIG_PARTITION_UUIDS to Kconfig first. But in order to cleanly
update all of the config files we must also update CMD_PART and CMD_GPT to also
be in Kconfig in order to avoid complex logic elsewhere to update all of the
config files.Signed-off-by: Patrick Delaunay
Signed-off-by: Patrick Delaunay
Signed-off-by: Tom Rini -
Signed-off-by: Patrick Delaunay
Signed-off-by: Patrick Delaunay -
Signed-off-by: Patrick Delaunay
Signed-off-by: Patrick Delaunay -
Signed-off-by: Patrick Delaunay
Signed-off-by: Patrick Delaunay -
Signed-off-by: Patrick Delaunay
Signed-off-by: Patrick Delaunay -
Signed-off-by: Patrick Delaunay
Signed-off-by: Patrick Delaunay
28 Dec, 2016
1 commit
-
With capacities getting bigger, we can see see messages with negative
numbers like "Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)".
Here the printed LBA is -387938128 when it should have been 3907029168.
To fix this, use the right format when displaying the unsigned integers.Signed-off-by: Jean-Jacques Hiblot
Reported-by: Yan Liu
02 Oct, 2016
2 commits
-
In both DOS and ISO partition tables the same code to create partition name
like "hda1" was repeated.Code moved to into a new function part_set_generic_name() in part.c and optimized.
Added recognition of MMC and SD types, name is like "mmcsda1".Signed-off-by: Petr Kulhavy
Reviewed-by: Tom Rini
Acked-by: Steve Rae
Reviewed-by: Simon Glass -
So far partition search by name has been supported only on the EFI partition
table. This patch extends the search to all partition tables.Rename part_get_info_efi_by_name() to part_get_info_by_name(), move it from
part_efi.c into part.c and make it a generic function which traverses all part
drivers and searches all partitions (in the order given by the linked list).For this a new variable struct part_driver.max_entries is added, which limits
the number of partitions searched. For EFI this was GPT_ENTRY_NUMBERS.
Similarly the limit is defined for DOS, ISO, MAC and AMIGA partition tables.Signed-off-by: Petr Kulhavy
Reviewed-by: Tom Rini
Acked-by: Steve Rae
17 May, 2016
12 commits
-
Return -EINVAL instead of -1 in this function, to provide a more meaningful
error.Signed-off-by: Simon Glass
-
This is not needed since we can use the functions provided by the legacy
block device support.Signed-off-by: Simon Glass
-
Drop use of the table in part.c for this feature.
Signed-off-by: Simon Glass
-
This function is implemented by the legacy block functions now. Drop it.
Signed-off-by: Simon Glass
-
This function is implemented by the legacy block functions now. Drop it.
Signed-off-by: Simon Glass
-
This function is implemented by the legacy block functions now. Drop it.
We cannot yet make sata_dev_desc[] private to common/sata.c as it is used by
the SATA drivers. This will require the SATA interface to be reworked.Signed-off-by: Simon Glass
-
This function is implemented by the legacy block functions now. Drop it.
Signed-off-by: Simon Glass
-
This function is implemented by the legacy block functions now. Drop it.
Signed-off-by: Simon Glass
-
This function is implemented by the legacy block functions now. Drop it.
Signed-off-by: Simon Glass
-
This function is implemented by the legacy block functions now. Drop it.
Signed-off-by: Simon Glass
-
Instead of calling xx_get_dev() functions for each interface type, use the
new legacy block driver which can provide the device through its interface.Signed-off-by: Simon Glass
-
This option currently enables both the command and the SCSI functionality.
Rename the existing option to CONFIG_SCSI since most of the code relates
to the feature.Signed-off-by: Simon Glass
15 Apr, 2016
1 commit
-
Fixes the following warning with PART_DEBUG enabled:
disk/part.c: In function ‘get_partition_info’:
disk/part.c:372:3: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat]Signed-off-by: Nishanth Menon
02 Apr, 2016
1 commit
-
Add a block device cache to speed up repeated reads of block devices by
various filesystems.This small amount of cache can dramatically speed up filesystem
operations by skipping repeated reads of common areas of a block
device (typically directory structures).This has shown to have some benefit on FAT filesystem operations of
loading a kernel and RAM disk, but more dramatic benefits on ext4
filesystems when the kernel and/or RAM disk are spread across
multiple extent header structures as described in commit fc0fc50.The cache is implemented through a minimal list (block_cache) maintained
in most-recently-used order and count of the current number of entries
(cache_count). It uses a maximum block count setting to prevent copies
of large block reads and an upper bound on the number of cached areas.The maximum number of entries in the cache defaults to 32 and the maximum
number of blocks per cache entry has a default of 2, which has shown to
produce the best results on testing of ext4 and FAT filesystems.The 'blkcache' command (enabled through CONFIG_CMD_BLOCK_CACHE) allows
changing these values and can be used to tune for a particular filesystem
layout.Signed-off-by: Eric Nelson
16 Mar, 2016
1 commit
-
We have a pretty nice and generic interface to ask for a specific block
device. However, that one is still based around the magic notion that
we know the driver name.In order to be able to write fully generic disk access code, expose the
currently internal list to other source files so that they can scan through
all available block drivers.Signed-off-by: Alexander Graf
Reviewed-by: Simon Glass
Tested-by: Simon Glass
15 Mar, 2016
7 commits
-
This is a device number, and we want to use 'dev' to mean a driver model
device. Rename the member.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Stephen Warren -
Rename three partition functions so that they start with part_. This makes
it clear what they relate to.Signed-off-by: Simon Glass
Tested-by: Stephen Warren -
We can use linker lists instead of explicitly declaring each function.
This makes the code shorter by avoiding switch() statements and lots of
header file declarations.While this does clean up the code it introduces a few code issues with SPL.
SPL never needs to print partition information since this all happens from
commands. SPL mostly doesn't need to obtain information about a partition
either, except in a few cases. Add these cases so that the code will be
dropped from each partition driver when not needed. This avoids code bloat.I think this is still a win, since it is not a bad thing to be explicit
about which features are used in SPL. But others may like to weigh in.Signed-off-by: Simon Glass
Reviewed-by: Tom Rini
Tested-by: Stephen Warren -
Rename this function to blk_get_device_part_str(). This is a better name
because it makes it clear that the function returns a block device and
parses a string.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Stephen Warren -
The current name is too generic. The function returns a block device based
on a provided string. Rename it to aid searching and make its purpose
clearer. Also add a few comments.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Stephen Warren -
The current name is too generic. Add a 'blk_' prefix to aid searching and
make its purpose clearer.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Stephen Warren -
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long
and causes 80-column violations, rename it to struct blk_desc.Signed-off-by: Simon Glass
Reviewed-by: Bin Meng
Tested-by: Stephen Warren
20 Jan, 2016
1 commit
-
On bootup the emmc's hw partition is always set to 0 and the partition
table is read from it. When switching to another hw partition the
partition table's id is not updated but instead the old one from
hw partition 0 is used. If there is no partition table on hw partition 0
then the code will terminate and return error even if the desired hw
partition contains a perfectly fine partition table. This fix updates
the partition table struct to correspond to the specified hw partition
before testing if the partition table is valid or not.Signed-off-by: Erik Tideman
Reviewed-by: Tom Rini
[trini: Squash the patch that corrected whitespace in the original into
this one, wrap with HAVE_BLOCK_DEVICE test]
Signed-off-by: Tom Rini
13 Nov, 2015
1 commit
-
code under flag CONFIG_PARTITION_TYPE_GUID
add parameter "type" to select partition type guidexample of use with gpt command :
partitions = uuid_disk=${uuid_gpt_disk}; \
name=boot,size=0x6bc00,uuid=${uuid_gpt_boot}; \
name=root,size=0x7538ba00,uuid=${uuid_gpt_root}, \
type=0fc63daf-8483-4772-8e79-3d69d8477de4;gpt write mmc 0 $partitions
Signed-off-by: Patrick Delaunay
25 Oct, 2015
2 commits
-
Add generic fs support, so that commands like ls, load and test -e can be
used on ubifs.Signed-off-by: Hans de Goede
Reviewed-by: Heiko Schocher -
This is not necessary / useful when not building with CONFIG_SANDBOX and
with the addition of ubifs support to the generic fs commands it actually
gets in the way, since both operate on a fake / NULL blkdev.Signed-off-by: Hans de Goede
Acked-by: Stephen Warren
25 Oct, 2014
1 commit
-
Signed-off-by: Jeroen Hofstee
25 Sep, 2014
1 commit
-
Cleanup disk/part.c
Signed-off-by: Pavel Machek
22 Jul, 2014
1 commit
-
Whitespace cleanups.
Signed-off-by: Pavel Machek
24 Jun, 2014
1 commit
-
Commit 95fac6ab4589 "sandbox: Use os functions to read host device tree"
removed the ability for get_device_and_partition() to handle the "host"
device type, and redirect accesses to it to the host filesystem. This
broke some unit tests that use this feature. So, revert that change. The
code added back by this patch is slightly different to pacify checkpatch.However, we're then left with "host" being both:
- A pseudo device that accesses the hosts real filesystem.
- An emulated block device, which accesses "sectors" inside a file stored
on the host.In order to resolve this discrepancy, rename the pseudo device from host
to hostfs, and adjust the unit-tests for this change.The "help sb" output is modified to reflect this rename, and state where
the host and hostfs devices should be used.Signed-off-by: Stephen Warren
Tested-by: Josh Wu
Acked-by: Simon Glass
Tested-by: Simon Glass