mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-02 14:29:23 +00:00
* Merge from Ubuntu:
- Give up scanning partitions after ten consecutive open failures (LP: #787461).
This commit is contained in:
parent
3a7793734a
commit
1497ac78d6
3
debian/changelog
vendored
3
debian/changelog
vendored
@ -10,6 +10,9 @@ grub2 (1.99-7) UNRELEASED; urgency=low
|
||||
[ Colin Watson ]
|
||||
* Cope with btrfs / inside an encrypted block device (thanks, alexeagar;
|
||||
LP: #757631).
|
||||
* Merge from Ubuntu:
|
||||
- Give up scanning partitions after ten consecutive open failures
|
||||
(LP: #787461).
|
||||
|
||||
-- Christian Perrier <bubulle@debian.org> Tue, 31 May 2011 20:10:47 +0200
|
||||
|
||||
|
36
debian/patches/partition_performance.patch
vendored
Normal file
36
debian/patches/partition_performance.patch
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
Description: Give up scanning partitions after ten consecutive open failures
|
||||
Scanning all the way up to 10000 is excessive and can cause serious
|
||||
performance problems in some configurations.
|
||||
Author: Colin Watson <cjwatson@ubuntu.com>
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/787461
|
||||
Forwarded: yes
|
||||
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/3320
|
||||
Last-Update: 2011-05-27
|
||||
|
||||
Index: b/grub-core/kern/emu/hostdisk.c
|
||||
===================================================================
|
||||
--- a/grub-core/kern/emu/hostdisk.c
|
||||
+++ b/grub-core/kern/emu/hostdisk.c
|
||||
@@ -564,6 +564,7 @@
|
||||
int i;
|
||||
char real_dev[PATH_MAX];
|
||||
struct linux_partition_cache *cache;
|
||||
+ int missing = 0;
|
||||
|
||||
strcpy(real_dev, dev);
|
||||
|
||||
@@ -602,7 +603,13 @@
|
||||
|
||||
fd = open (real_dev, O_RDONLY);
|
||||
if (fd == -1)
|
||||
- continue;
|
||||
+ {
|
||||
+ if (missing++ < 10)
|
||||
+ continue;
|
||||
+ else
|
||||
+ return 0;
|
||||
+ }
|
||||
+ missing = 0;
|
||||
close (fd);
|
||||
|
||||
start = find_partition_start (real_dev);
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -19,3 +19,4 @@ mkrescue_efi_modules.patch
|
||||
mkconfig_loopback.patch
|
||||
lazy_stat.patch
|
||||
btrfs_stat.patch
|
||||
partition_performance.patch
|
||||
|
Loading…
Reference in New Issue
Block a user