[Pkg-xfce-devel] Bug#583325: thunar: copying progress is misleading because files are not synced to disk
John Lindgren
john.lindgren at tds.net
Mon May 31 15:47:12 UTC 2010
I tried editing /etc/xdg/xfce4/mount.rc (attached) to mount vfat file
systems with the "sync" option:
[vfat]
uid=<auto>
shortname=winnt
# FreeBSD specific option
longnames=true
sync
But it doesn't seem to have any effect, even after reboot. After I
mount a flash drive with Thunar, here is what mount says:
/dev/sdb on /media/USB Disk type vfat (rw,nosuid,nodev,uhelper=hal,uid=1000,shortname=winnt)
And here is what lshal says:
udi = '/org/freedesktop/Hal/devices/volume_uuid_0AFA_E503'
block.device = '/dev/sdb' (string)
block.is_volume = true (bool)
block.major = 8 (0x8) (int)
block.minor = 16 (0x10) (int)
block.storage_device = '/org/freedesktop/Hal/devices/storage_serial_Fujifilm_USB_Drive_2871434031E02169_0_0' (string)
info.capabilities = {'volume', 'block'} (string list)
info.category = 'volume' (string)
info.interfaces = {'org.freedesktop.Hal.Device.Volume'} (string list)
info.parent = '/org/freedesktop/Hal/devices/storage_serial_Fujifilm_USB_Drive_2871434031E02169_0_0' (string)
info.product = 'USB Disk' (string)
info.udi = '/org/freedesktop/Hal/devices/volume_uuid_0AFA_E503' (string)
linux.hotplug_type = 3 (0x3) (int)
linux.sysfs_path = '/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-3/2-3:1.0/host6/target6:0:0/6:0:0:0/block/sdb/fakevolume' (string)
org.freedesktop.Hal.Device.Volume.method_argnames = {'mount_point fstype extra_options', 'extra_options', 'extra_options'} (string list)
org.freedesktop.Hal.Device.Volume.method_execpaths = {'hal-storage-mount', 'hal-storage-unmount', 'hal-storage-eject'} (string list)
org.freedesktop.Hal.Device.Volume.method_names = {'Mount', 'Unmount', 'Eject'} (string list)
org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'} (string list)
volume.block_size = 512 (0x200) (int)
volume.fstype = 'vfat' (string)
volume.fsusage = 'filesystem' (string)
volume.fsversion = 'FAT16' (string)
volume.ignore = false (bool)
volume.is_disc = false (bool)
volume.is_mounted = true (bool)
volume.is_mounted_read_only = false (bool)
volume.is_partition = false (bool)
volume.label = 'USB Disk' (string)
volume.linux.is_device_mapper = false (bool)
volume.mount.valid_options = {'ro', 'sync', 'dirsync', 'noatime', 'nodiratime', 'relatime', 'noexec', 'quiet', 'remount', 'exec', 'utf8', 'shortname=', 'codepage=', 'iocharset=', 'umask=', 'dmask=', 'fmask=', 'uid=', 'flush'} (string list)
volume.mount_point = '/media/USB Disk' (string)
volume.num_blocks = 499200 (0x79e00) (uint64)
volume.size = 255590400 (0xf3c0000) (uint64)
volume.unmount.valid_options = {'lazy'} (string list)
volume.uuid = '0AFA-E503' (string)
At any rate, I'm not sure that I do want to mount the device with the
"sync" option, since that (if I am correct) will sync to the disk after
every single write. All I want to do is sync to the disk after a
complete file is copied.
John Lindgren
On Thu, 2010-05-27 at 14:33 +0200, Yves-Alexis Perez wrote:
> On 27/05/2010 14:10, John Lindgren wrote:
> > On Thu, 2010-05-27 at 08:07 +0200, Yves-Alexis Perez wrote:
> >>> It seems that the files are merely being written to a kernel write
> >>> buffer; if so, the trivial fix would be to call fsync() before closing
> >>> each file that is written. I can't think of any reason not to do this.
> >>
> >> Because that would slow down everything, imho. What you really want is
> >> to mount your usb keys with the sync option.
> >
> > Thunar doesn't provide such an option, as far as I know. (I am not
> > going to create an fstab entry for every removable disk I will ever
> > use.)
>
> Thunar isn't, but exo is now able to do it, iirc. Look in
> /etc/xdg/xfce4/mount.rc
>
> But I wouldn't advise to do it as it can slow down quite a bit.
More information about the Pkg-xfce-devel
mailing list