diff options
author | Dave Reisner <dreisner@archlinux.org> | 2012-04-29 15:00:38 -0400 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-06-25 23:37:10 -0500 |
commit | e183522e3168c4a31103b3c7910fa8d29333fb5a (patch) | |
tree | b95bd05a19eb44ffb16cdf0306a7d1579e064863 /lib/libalpm/diskspace.h | |
parent | 82c999a8bfbffab4740742b4746435f5f1657643 (diff) | |
download | pacman-e183522e3168c4a31103b3c7910fa8d29333fb5a.tar.xz |
diskspace: only load filesystem info on demand
Only load filesystem details for the mount points that we're actually
going to write to. This reduces our syscall count considerably. In the
case of installation, we would actually stat every mountpoint twice (an
extra round for download diskspace) which means (on my system) a total
of 60 syscalls to write to 3 partitions when installing the kernel
package. This change reduces the 60 syscalls down to the expected 3.
A slight debug output change is added here to discern between a
mountpoint added to our linked list versus when we actually load the fs
info.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/diskspace.h')
-rw-r--r-- | lib/libalpm/diskspace.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libalpm/diskspace.h b/lib/libalpm/diskspace.h index a54aa5e3..591d9337 100644 --- a/lib/libalpm/diskspace.h +++ b/lib/libalpm/diskspace.h @@ -37,6 +37,12 @@ enum mount_used_level { USED_INSTALL = (1 << 1), }; +enum mount_fsinfo { + MOUNT_FSINFO_UNLOADED = 0, + MOUNT_FSINFO_LOADED, + MOUNT_FSINFO_FAIL, +}; + typedef struct __alpm_mountpoint_t { /* mount point information */ char *mount_dir; @@ -46,6 +52,7 @@ typedef struct __alpm_mountpoint_t { blkcnt_t max_blocks_needed; enum mount_used_level used; int read_only; + enum mount_fsinfo fsinfo_loaded; FSSTATSTYPE fsp; } alpm_mountpoint_t; |