Bug 354931 - RFE: better handling of empty /proc/swaps
RFE: better handling of empty /proc/swaps
Status: CLOSED DUPLICATE of bug 353191
Product: Fedora
Classification: Fedora
Component: parted (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Joel Andres Granados
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-10-26 17:41 EDT by John Reiser
Modified: 2008-10-17 04:53 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-17 04:53:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Reiser 2007-10-26 17:41:01 EDT
Description of problem: During a fresh install, this sequence of discovering
that there is no swap space is repeated 2395 times:
----- (from strace)
719   open("/proc/swaps", O_RDONLY)     = 14
719   fstat(14, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
719   mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aaac2514000
719   read(14, "Filename\t\t\t\tType\t\tSize\tUsed\tPrio"..., 1024) = 37
719   stat("Filename", 0x7fff3f67cd00)  = -1 ENOENT (No such file or directory)
719   read(14, "", 1024)                = 0
719   close(14)                         = 0
719   munmap(0x2aaac2514000, 4096)      = 0
-----
Instead, the information that there is no swap space should be cached.


Version-Release number of selected component (if applicable):
anaconda-11.3.0.45-1


How reproducible: always


Steps to Reproduce:
1. fresh install from DVD
2. as soon as vtty2 is available during the install:
strace -f -o '|gzip' -q -p <pid-of-anaconda>  > strace.out &
(you must suppy 'strace' on a USB flash memory device before boot, and do the
mount yourself.)
3. inspect strace.out (63MB compressed, 1GB uncompressed) for:
open("/proc/swaps") and stat("Filename").
  
Actual results: 2395 repetitions of discovering that there is no swap space


Expected results: remember after the first time.


Additional info:
Comment 1 Chris Lumens 2008-06-21 12:56:12 EDT
This is parted calling _mount_table_search via _partition_is_mounted_by_dev in
libparted/arch/linux.c over and over again.
Comment 2 Joel Andres Granados 2008-10-17 04:53:24 EDT

*** This bug has been marked as a duplicate of bug 353191 ***

Note You need to log in before you can comment on or make changes to this bug.