[U-Boot] [PATCH v2] test: ums: Add sleep before unmount directory

Lukasz Majewski
2014-11-07T16:52:27Z

Hi Marek,

> On Friday, November 07, 2014 at 02:05:55 PM, 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
> >
> > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
>
> Why exactly does mount not block until it can unmount the device
> anyway ?

Has mount or umount expose any blocking behavior?

As fair as I remember you cannot umount directory when any process
holds reference to it.

Here it looks like process which copy data queues data for writing and
exit from cp.

Presumably, when we call umount there is still some pending data for
write.

Hence the error.

Maybe there is a switch for mount/umount/cp which can correct such
behavior?

>
> Best regards,
> Marek Vasut

--
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group