The command mount(8) does not write anywhere, if you see any change in
the filesystem then it's done by kernel filesystem driver.

I guess the confusing thing for users is that mount(8) command calls
mount(2) syscall two times:

# strace -e mount mount /dev/loop0 /mnt/test
mount("/dev/loop0", "/mnt/test", "udf", MS_MGC_VAL, NULL) = -1 EACCES 
(Permission denied)
mount: /dev/loop0 is write-protected, mounting read-only
mount("/dev/loop0", "/mnt/test", "udf", MS_MGC_VAL|MS_RDONLY, NULL) = 0

The first attempt failed with EACCES, then mount(8) retry with
MS_RDONLY. This is expected and wanted behaviour. I guess that kernel
udf driver write to the filesystem during the first attempt when it's
read-write.

If you try mount with "-o ro" then you won't see the issue.

IMHO udf kernel driver is little bit inconsistent. It does not allow to
mount the image read-write, but it modifies the filesystem before it
returns EACCES :-)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1277146

Title:
  mount -o loop.... changes the udf image

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/kernel-package/+bug/1277146/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to