All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@cfl.rr.com>
To: Pekka J Enberg <penberg@cs.Helsinki.FI>
Cc: Peter Osterlund <petero2@telia.com>,
	linux-kernel@vger.kernel.org, bfennema@falcon.csc.calpoly.edu,
	Christoph Hellwig <hch@lst.de>, Al Viro <viro@ftp.linux.org.uk>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [RFC][PATCH] UDF filesystem uid fix
Date: Tue, 14 Feb 2006 10:54:33 -0500	[thread overview]
Message-ID: <43F1FD39.1040900@cfl.rr.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0602140916230.15339@sbz-30.cs.Helsinki.FI>

Pekka J Enberg wrote:
> I don't haven an UDF partition to test on so I am only reading the code. 
> With your patch, every time an in-memory inode has the same uid/gid as the 
> one you passed as mount option, the id on disk will become -1, no? So for 
> example, doing chown 100 for a file writes -1 to disk if you passed 100 
> as uid mount option. Am I missing something here?
>
>   
That is exactly correct. 

> Yes, I agree that the current code is broken. I was talking about what the 
> semantics should be and that your patch doesn't quite get us there. Do you 
> disagree with that? The UDF specification I am looking at [1] says that -1 
> is used by operating systems that do not support uid/gid to denote an 
> invalid id (although ECMA-167 doesn't seem to have such rule), which is  
> why I think it's an bad idea for Linux to ever write it on disk. Instead, 
> we should always write the proper id on disk unless it was invalid in the 
> first place and we did not explicity change it (via chown, for example).
Sometimes you DON'T want a valid UID written to the disk.  In the case 
of a typical desktop user, there is only one uid that is ever going to 
access the disk, but that uid may be different on each computer, even 
though it's the same person.  Thus they want to be able to take the disc 
from computer to computer, and have access to their files.  Since the 
existing uid/gid override mount options only apply if the on disk id is 
-1, it seemed a simple and appropriate thing to store -1 in the case 
where the id matches the mount option.  The only use case that this 
patch changes is where the id matches the mount option.  In that case, 
the user expected behavior is for the files on the disc to appear to be 
owned by the specified uid, with the added benefit that this will hold 
true if you remount with another uid specified, possibly even on another 
machine.  This seems to meet user expectations much better than the 
previous behavior of changing ownership to root when unmounted. 

If you want real IDs to be stored, then do nothing.  Simply continue to 
use the system just like before, where you did not specify a uid as a 
mount option. 



  parent reply	other threads:[~2006-02-14 15:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-12 18:17 [RFC][PATCH] UDF filesystem uid fix Peter Osterlund
2006-02-13  9:49 ` Pekka Enberg
2006-02-13 16:51   ` Phillip Susi
2006-02-14  7:28     ` Pekka J Enberg
2006-02-14 11:36       ` Sergey Vlasov
2006-02-14 15:54       ` Phillip Susi [this message]
2006-02-15  7:31         ` Pekka Enberg
2006-02-15 15:55           ` Phillip Susi
2006-02-15 17:31             ` Pekka Enberg
2006-02-15 18:48               ` Phillip Susi
2006-02-15 20:28                 ` Pekka Enberg
2006-03-04 23:19                 ` Phillip Susi

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=43F1FD39.1040900@cfl.rr.com \
    --to=psusi@cfl.rr.com \
    --cc=akpm@osdl.org \
    --cc=bfennema@falcon.csc.calpoly.edu \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.Helsinki.FI \
    --cc=petero2@telia.com \
    --cc=viro@ftp.linux.org.uk \
    /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.