Bug 772103

Summary: free space: unknown on removable media properties tab
Product: Red Hat Enterprise Linux 6 Reporter: Vladimir Benes <vbenes>
Component: nautilusAssignee: Tomáš Bžatek <tbzatek>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: low Docs Contact:
Priority: low    
Version: 6.3CC: tpelka, tsmetana
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: nautilus-2.28.4-19.el6 Doc Type: Bug Fix
Doc Text:
Cause: A short-lived internal object Consequence: Free space was not displayed in the volume Properties dialog Fix: A reference to other internal object has been placed in Result: Free space is now displayed properly
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 14:24:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
screenshot
none
The Patch none

Description Vladimir Benes 2012-01-05 23:58:12 UTC
Description of problem:
when I attach 32 GB micro sdhc card via usb reader I can see its free space in properties in cake diagram but there is a sign Free space: unknown just above it.. it kind of weird .. it should be taken from the same info, shouldn't it?  

Version-Release number of selected component (if applicable):
nautilus-2.28.4-18.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.open micro sdhc formatted in android device
2.mount it via usb card reade
3.go into properties 
  
Actual results:
in basic tab you should see both free space values identically

Expected results:
you can see total, used, free but also sign that free is unknown just above diagram

Additional info:

Comment 1 Vladimir Benes 2012-01-05 23:58:49 UTC
Created attachment 551045 [details]
screenshot

Comment 2 Tomáš Bžatek 2012-01-06 11:12:43 UTC
Yeah, this looks really stupid. Does `df` work as expected? And what about `gvfs-info -f <mount_point>`?

Comment 3 Vladimir Benes 2012-01-06 11:33:41 UTC
gvfs-info -f /media/F1BA-345D/
attributes:
  filesystem::size: 7962914816
  filesystem::free: 4456239104
  filesystem::type: msdos

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1             7.5G  3.3G  4.2G  45% /media/F1BA-345D

this is my usb flash so I assume all removable media are affected

Comment 4 Vladimir Benes 2012-01-06 13:41:35 UTC
haha this is really funny .. when nautilus window is opened.. it shows correct Free space in both areas.. so insert flash, wait for automatic mount and nautilus opening, go into prefs via usb icon and now everything is fine.. close the window and the free space changes to unknown immediately.. what a magic!! :-)

Comment 6 Tomáš Bžatek 2012-03-02 14:30:48 UTC
Created attachment 567078 [details]
The Patch

(In reply to comment #4)
> haha this is really funny .. when nautilus window is opened.. it shows correct
> Free space in both areas.. so insert flash, wait for automatic mount and
> nautilus opening, go into prefs via usb icon and now everything is fine.. close
> the window and the free space changes to unknown immediately.. what a magic!!
> :-)

Yes, that was the problem. Nautilus shares instances of NautilusDirectory objects but there was not one until you opened a window. So we created a new instance on every free space display request but before it had chance to display the result, the object got unref'ed.

Comment 7 Tomáš Bžatek 2012-03-02 17:46:25 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: A short-lived internal object

Consequence: Free space was not displayed in the volume Properties dialog

Fix: A reference to other internal object has been placed in

Result: Free space is now displayed properly

Comment 10 errata-xmlrpc 2012-06-20 14:24:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0914.html