From: Lukasz Majewski <l.majewski@majess.pl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] test: ums: Add sleep before unmount directory
Date: Thu, 6 Nov 2014 22:30:17 +0100 [thread overview]
Message-ID: <20141106223017.22223b37@jawa> (raw)
In-Reply-To: <545BA91C.1050902@wwwdotorg.org>
On Thu, 06 Nov 2014 10:00:12 -0700
Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 11/06/2014 03:23 AM, Lukasz Majewski wrote:
> > This change helps to run script on machines with quite long uptime.
> > Without this the following error emerges:
> >
> > File: ./dat_14M.img
> > umount: /mnt/tmp-ums-test: device is busy.
> > (In some cases useful info about processes that use
> > the device is found by lsof(8) or fuser(1))
> > TX: md5sum:083d3d22b542d3ecba61b12d17e03f9f
> > mount: /dev/sdd6 already mounted or /mnt/tmp-ums-test busy
> > mount: according to mtab, /dev/sdd6 is already mounted
> > on /mnt/tmp-ums-test
>
> > diff --git a/test/ums/ums_gadget_test.sh
> > b/test/ums/ums_gadget_test.sh
>
> > cp ./$1 $MNT_DIR
> > + sleep 2
> > umount $MNT_DIR
>
> I don't think there's any guarantee the "2" is the exact correct
> amount of time to sleep; I presume you derived the value by trying
> some values until you found one that works, and so the actual value
> required may vary from system to system. How about something like the
> following, which I use in a script that copies a new kernel to an SD
> card, where I experienced a similar issue:
>
> while true; do
> sudo umount /mnt/C-ROOT/
> if [ $? -eq 0 ]; then
> break
> fi
> echo sleeping to wait for umount...
> sleep 1
> done
Stephen, It is exactly what I'm looking for.
Thanks a lot for support.
Best regards,
Lukasz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141106/b2751ed4/attachment.pgp>
next prev parent reply other threads:[~2014-11-06 21:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 10:23 [U-Boot] [PATCH] test: ums: Add sleep before unmount directory Lukasz Majewski
2014-11-06 17:00 ` Stephen Warren
2014-11-06 21:30 ` Lukasz Majewski [this message]
2014-11-07 13:05 ` [U-Boot] [PATCH v2] " Lukasz Majewski
2014-11-07 15:28 ` Marek Vasut
2014-11-07 16:52 ` Lukasz Majewski
2014-11-07 21:02 ` Marek Vasut
2014-11-07 15:33 ` Stephen Warren
2014-11-07 21:54 ` Wolfgang Denk
2014-11-07 22:00 ` Stephen Warren
2014-11-07 23:03 ` Wolfgang Denk
2014-11-12 14:29 ` Lukasz Majewski
2014-11-12 16:45 ` Wolfgang Denk
2014-11-12 18:11 ` Stephen Warren
2014-11-12 21:49 ` Lukasz Majewski
2014-11-14 10:43 ` Lukasz Majewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141106223017.22223b37@jawa \
--to=l.majewski@majess.pl \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.