* pseudo-symlinks on directories
@ 2004-10-22 2:32 Steve French
2004-10-22 5:26 ` Erik Latoshek
0 siblings, 1 reply; 3+ messages in thread
From: Steve French @ 2004-10-22 2:32 UTC (permalink / raw)
To: linux-fsdevel, linux-cifs-client, samba-technical
There is a file type similar in some ways to symlinks, called junctions
(For NTFS and CIFS they are a form of "reparse point") that is supported
in CIFS and which a few filesystems have to deal with. The only valid
case I have seen is that in which directories (rather than files) are
marked as reparse points but that leads to the question -
Should junctions (reparse points) be treated as symlinks or as
directories?
Linux's NTFS filesystem seems to ignore the flag and treat them as
directories. I had been treating them in the cifs filesystem as a
symlink (although temporarily I do not support readlink on them) but the
path that they return typically has what Linux what consider an invalid
server local absolute path (e.g. "c:\target_dir") which follow_link
would not be able to handle. If I ignore the reparse flag and treat
them as directories (as NTFS does) rather than symlinks, they would look
much like a hardlinked directory (if that were legal) but with different
inode numbers on source and target. If I treat it as a symlink then I
would need to go through hoops in cifs_readlink and cifs_followlink to
be able to return the proper information in "ls -l" and similar commands
but still allow cd to the directory to work.
There is a small amount of useful information that an application has
when it knows that a directory is symlinked, even though the path can
not be followed rationally on the client, but I think that it is not
enough to make it worth while to continue to treat as symlinks.
My gut reaction is to follow a recent patch suggestion and change cifs
client to treat these junctions/reparse points as directories (which is
a trivial change to the cifs vfs code), perhaps with a fake xattr for
the inode that gives the reparse info.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pseudo-symlinks on directories
2004-10-22 2:32 pseudo-symlinks on directories Steve French
@ 2004-10-22 5:26 ` Erik Latoshek
2004-10-22 15:27 ` [linux-cifs-client] " Steven French
0 siblings, 1 reply; 3+ messages in thread
From: Erik Latoshek @ 2004-10-22 5:26 UTC (permalink / raw)
To: linux-cifs-client; +Cc: linux-fsdevel, samba-technical
maybe we must look at this issue at safety point, when deleting such
directories (that look like simple dirs but are links and application
cannot know this) we will delete all files inside even directories to
which link points.
i think that this will be surprising for user, "deleted one directory
but lost files in other directories". he cannot know that directory is
linked.
so i think that even making directory look like not-working link is ok.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-cifs-client] Re: pseudo-symlinks on directories
2004-10-22 5:26 ` Erik Latoshek
@ 2004-10-22 15:27 ` Steven French
0 siblings, 0 replies; 3+ messages in thread
From: Steven French @ 2004-10-22 15:27 UTC (permalink / raw)
To: Erik Latoshek
Cc: linux-fsdevel, samba-technical,
linux-cifs-client-bounces+sfrench=us.ibm.com, linux-cifs-client
> he cannot know that directory is linked.
He could, albeit awkwardly, if I export the dos attributes via a
pseudo-xattr (they already get stored in the cifs vfs specific part of the
inode) since the reparse point bit would be set there. Note that Samba
has talked about doing this too to save dos attrs (and would be something
vfat, NTFS and a few others also export).
As an alternative, the reparse info itself could be queried (the cifs vfs
has the code necessary to query reparse info, but it is dead code in 2.6.9
and later) whenever someone asks for xattr such as "system.reparse_info"
or some such.
Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-22 15:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-22 2:32 pseudo-symlinks on directories Steve French
2004-10-22 5:26 ` Erik Latoshek
2004-10-22 15:27 ` [linux-cifs-client] " Steven French
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).