Bug 354931 - RFE: better handling of empty /proc/swaps
Summary: RFE: better handling of empty /proc/swaps
Keywords:
Status: CLOSED DUPLICATE of bug 353191
Alias: None
Product: Fedora
Classification: Fedora
Component: parted
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Joel Andres Granados
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-10-26 21:41 UTC by John Reiser
Modified: 2008-10-17 08:53 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-17 08:53:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description John Reiser 2007-10-26 21:41:01 UTC
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 16:56:12 UTC
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 08:53:24 UTC

*** 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.