lkml.org 
[lkml]   [2004]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Delay in unmounting a USB pen drive
    From
    Date
    On Wed, 2004-11-24 at 14:55 +0530, Raj wrote:
    > SuSE kernel 2.6.5:
    >
    > My USB pen drive has a vfat FS. When i transfer some files & try to
    > unmount the drive ( umount /mnt ) , the command appears hung. CTRL+C also
    > does not work. Only later did i realise that it was actually taking a
    > longer time ( 10 - 15 sec )
    > to unmount.
    >
    > My questions are:
    > - Why is it taking a long time to unmount ?
    > - Is it safe to remove the pen drive from it's slot when the umount is still in
    > progress ?? ( I tried this the first time & maybe lucky me, the
    > files copied were fine )

    You are mounting with async flag (or this is the default) which means
    that all the unwritten data is synced when you do umount. You can
    verify this by typing "sync" waiting for that to complete and then the
    umount should be immediate.

    You can change this by using the "sync" option to mount which will cause
    data to be written synchronously and the umount will be instantaneous.
    Note that this will cause device write to be _much_ slower!

    One thing is certain, do NOT unplug before the umount completes or you
    will corrupt your fs on the stick for sure.

    Best regards,

    Anton
    --
    Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
    Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
    Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
    WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:08    [W:0.023 / U:31.104 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site