* Linux hfsplus corrupts chflags bits?
@ 2012-09-13 21:26 Paolo Giarrusso
2012-09-13 21:35 ` Matthew Garrett
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Giarrusso @ 2012-09-13 21:26 UTC (permalink / raw)
To: fs_hfs, Linux Kernel Mailing List, Al Viro, Christoph Hellwig,
Matthew Garrett, Artem Bityutskiy, Miklos Szeredi
[Please CC me on replies as I'm not subscribed.]
The Linux hfsplus implementation seems to repeatedly corrupt
hfsplus_perm->rootflags; when the same filesystem is read on Mac OS X,
this changes the attribs touched by chflags and makes a random
selection of files "locked" and thus untouchable. This happened for me
on Ubuntu 12.04 "Precise Pangolin", based on a 3.2.0 kernel, reports
appear from various other versions and the source doesn't seem heavily
changed.
I've had experience of this, shared by other users on this
superuser.com discussion:
http://superuser.com/a/457494/46794
Given that hfsplus isn't even mentioned in MAINTAINERS, I've used
./scripts/get_maintainer.pl to select recipients.
To convince you that the flags are in fact set randomly, here's a
listing of the backup of my home created through rsync on Linux (which
supposedly isn't even aware of these flags). Notice: none of these
flags are supposed to be set.
# 'ls' -ld -O /Volumes/HFS+Backup/Users/pgiarrusso/*
drwx------ 31 pgiarrusso staff uchg,nodump,opaque 1054 Aug
13 02:00 /Volumes/HFS+Backup/Users/pgiarrusso/Desktop
drwx------ 36 pgiarrusso staff nodump 1224 Jul
22 16:04 /Volumes/HFS+Backup/Users/pgiarrusso/Documents
drwx------ 108 pgiarrusso staff uappnd 3672 Aug
13 11:43 /Volumes/HFS+Backup/Users/pgiarrusso/Downloads
drwx------ 13 pgiarrusso staff uappnd,uchg,opaque 442 Jul
22 05:04 /Volumes/HFS+Backup/Users/pgiarrusso/Dropbox
drwx------ 53 pgiarrusso staff - 1802 Aug
12 00:58 /Volumes/HFS+Backup/Users/pgiarrusso/Library
drwx------ 11 pgiarrusso staff uchg,nodump,opaque 374 Jul
22 17:25 /Volumes/HFS+Backup/Users/pgiarrusso/Movies
drwx------ 13 pgiarrusso staff uappnd,uchg,nodump 442 Jun
10 12:05 /Volumes/HFS+Backup/Users/pgiarrusso/Music
drwx------ 15 pgiarrusso staff uappnd,nodump,opaque 510 Jun
10 12:05 /Volumes/HFS+Backup/Users/pgiarrusso/Pictures
drwxr-x--- 11 pgiarrusso staff opaque 374 Jul
6 15:33 /Volumes/HFS+Backup/Users/pgiarrusso/Public
drwxr-xr-x 34 pgiarrusso staff uappnd,uchg,opaque 1156 May
27 12:39 /Volumes/HFS+Backup/Users/pgiarrusso/Sites
drwxr-xr-x 2 pgiarrusso staff uappnd,nodump,opaque 68 Jun
10 21:43 /Volumes/HFS+Backup/Users/pgiarrusso/VirtualBox VMs
-rwxr-xr-x 1 pgiarrusso staff uappnd,nodump,opaque 1703 Feb
19 2012 /Volumes/HFS+Backup/Users/pgiarrusso/bash-prompt.sh
drwxr-xr-x 22 pgiarrusso staff - 748 Aug
10 19:47 /Volumes/HFS+Backup/Users/pgiarrusso/bin
lrwxrwxrwx 1 pgiarrusso staff nodump,opaque 37 Sep
27 2011 /Volumes/HFS+Backup/Users/pgiarrusso/default.sfx ->
/Users/pgiarrusso/opt/rar/default.sfx
-rw-r--r-- 1 pgiarrusso staff uappnd,uchg 1375563169 Aug
2 18:52 /Volumes/HFS+Backup/Users/pgiarrusso/heapdump-1343925310626.hprof
drwxr-xr-x 22 pgiarrusso staff uappnd,nodump 748 Aug
1 22:15 /Volumes/HFS+Backup/Users/pgiarrusso/opt
drwxr-xr-x 7 pgiarrusso staff uappnd 238 Apr
19 20:00 /Volumes/HFS+Backup/Users/pgiarrusso/share
drwxr-xr-x 35 pgiarrusso staff nodump,opaque 1190 Aug
10 00:06 /Volumes/HFS+Backup/Users/pgiarrusso/tmp
Cheers,
--
Paolo 'Blaisorblade' Giarrusso - Ph.D. Student
http://www.informatik.uni-marburg.de/~pgiarrusso/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Linux hfsplus corrupts chflags bits?
2012-09-13 21:26 Linux hfsplus corrupts chflags bits? Paolo Giarrusso
@ 2012-09-13 21:35 ` Matthew Garrett
[not found] ` <CAAcnjCR1x5_0o13qM5UJsWBh2D2xoSMw5WE4ky0Mzfz_v=6PqQ@mail.gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Garrett @ 2012-09-13 21:35 UTC (permalink / raw)
To: Paolo Giarrusso
Cc: fs_hfs, Linux Kernel Mailing List, Al Viro, Christoph Hellwig,
Artem Bityutskiy, Miklos Szeredi
There was a similar problem with the userflags field - we were writing
random data. It wouldn't surprise me if this is another case where a
field is just not being initiaised.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Fwd: Linux hfsplus corrupts chflags bits?
[not found] ` <CAAcnjCR1x5_0o13qM5UJsWBh2D2xoSMw5WE4ky0Mzfz_v=6PqQ@mail.gmail.com>
@ 2012-09-14 13:53 ` Paolo Giarrusso
0 siblings, 0 replies; 3+ messages in thread
From: Paolo Giarrusso @ 2012-09-14 13:53 UTC (permalink / raw)
To: Linux Kernel Mailing List
[Re-sending to LKML - it was rejected because my phone sent the mail
also in HTML.]
On Thu, Sep 13, 2012 at 11:35 PM, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> There was a similar problem with the userflags field - we were writing
> random data.
Ouch, sorry for the noise! I'm pretty sure it's exactly the same
problem: I wrote rootflags but meant userflags.
I might be wrong, but I think that's the case because your bugfix was
merged after 3.3. Instead I was running 3.2.
Somewhat unrelatedly, I noticed that most flags can't be set even by
ioctl, so Linux backup utilities can't preserve those flags.
Is that something which could be fixed, say by exposing them as
extended attributes?
I'll doublecheck that all randomly set flags are indeed userflags. To
be sure: userflags contains flags which can be set by the owner, while
rootflags can only be altered by the superuser, right? So I can check
here on Darwin's man chflags
(https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/10.6/man1/chflags.1.html)
Cheers,
--
Paolo 'Blaisorblade' Giarrusso - Ph.D. Student
http://www.informatik.uni-marburg.de/~pgiarrusso/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-14 13:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 21:26 Linux hfsplus corrupts chflags bits? Paolo Giarrusso
2012-09-13 21:35 ` Matthew Garrett
[not found] ` <CAAcnjCR1x5_0o13qM5UJsWBh2D2xoSMw5WE4ky0Mzfz_v=6PqQ@mail.gmail.com>
2012-09-14 13:53 ` Fwd: " Paolo Giarrusso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox