9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Paweł Lasek" <pawel.lasek@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: [9fans] Re: everything is a directory
Date: Mon, 20 Aug 2007 20:48:19 +0200	[thread overview]
Message-ID: <9f3897940708201148s3d1300abl81baa04ca8e30f19@mail.gmail.com> (raw)
In-Reply-To: <af1d2f0852998cc2261f0c5c19568b69@coraid.com>

On 8/20/07, erik quanstrom <quanstro@coraid.com> wrote:
> > * (IIRC) Beagle daemon uses extended attributes to track files that
> > were scanned and are not modified - they contain part of it's detected
> > metadata, hash and DB pointer
>
> so, to summarize.  beagle is using attributes to extend the file object.
> i think the main benefit files (and a filesystem) is exactly that they
> are not objects and can't be extended.

The beagle example is the weakest, since I don't use it ( it's written
in .NET, uses a bunch of weird tools and AFAIK doesn't play well with
external storage -- shortly, I'd do it differently :D).

> >
> > * NTFS discards the Unix concept of a file entirely - what was shown
> > before as trouble with Alternate Data Streams is in fact trouble of
> > keeping backward compatibility (Internally, NT doesn't have drive
> > letters or any of the DOS stuff). A File in NTFS is a MFT entry with a
> > bunch of attributes. Those attributes have several types/names
> > defined, like DATA for file contents, one for keeping filename (for
> > which there are three namespaces: DOS8.3, Windows, POSIX), one for
> > legacy DOS attributes (used by the official, backward compatible API),
> > one for security data, and others used mostly by system daemons
> > (Although NT5+ explorer uses one to hold various comments about files.
> > Rarely used by people I think).
> >
> > I especially like the NTFS implementation, because it allows to use
> > NTFS for most Operating Systems without modifying internal structure,
> > while making it easy to add "compatibility layer"
>
> so how does one create a sensible grep utility that operates on an arbitrary
> mft entry?

I'm not WinAPI expert, so I can' tell you implementation details on
Windows, but if you are writing your own API, all you need is to open
attribute/iterate over attributes instead of fopen/fread/... As I
wrote, they weren't exactly made "for the users" and as long as you
don't put vital user data inside, it should not pose problems. The
only thing I'd add is that I think NTFS driver should allow
'open'/'read'/'write'/etc on directory with directory structure as
it's data field (directories have different type in NTFS, so they
don't have the canonical DATA field)

If attributes are used properly on NTFS, your grep question changes to
"How does one create a sensible grep for file access rights?" in
plan9/unix context. AFAIK everyone uses 'stat' for such things instead
of grepping FS structures?

The biggest problem is exactly the same as the one with Unix signals -
people make wrong use of the tools - most of the time, NTFS attributes
are only accessed through API calls for the data that is stored inside
or by FS driver itself, not directly by apps. On the other hand, it
means that I can implement a Plan 9 NTFS variant without remaking FS
structures and if I put some dummy data in MFT entries, It will be
readable (even writable) by NT, linux, etc.

> > As for things that need to work with cp/mv/others, I suggest making
> > better file formats or adding metadata in different file. It's not the
> > smartest use of Extended Attributes/NTFS attributes :-)
>
> i think you're missing the real difficulty with attributres.  the tools approach
> works precicely because files are not objects and can't be extended.
>
> if you want a system with extensible object storage and not a filesystem,
> i think you need to think about how to add the extension to all tools at
> the same time.  (or maybe you dispense with the tools approach.)  this
> doesn't seem like a promising route to me.

I said that what is put into attributes should be easily discarded
away, so while tools might support copying them, it's up to you to
specify that they should. Like the xfstools example before - none of
them use eas the way that you should need to modify basic tools (at
least i don't see any reason to use them that way).

> - erik
>

I'd sum it this way: I'm all for *wisely* used external attributes -
the trouble is the *wisely* part :-)

-- 
Paul Lasek


  reply	other threads:[~2007-08-20 18:48 UTC|newest]

Thread overview: 107+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-16  9:30 [9fans] " jsnx
2007-08-16 10:42 ` maht
2007-08-16 11:47   ` Charles Forsyth
2007-08-17  8:41   ` [9fans] " jsnx
2007-08-16 12:39 ` [9fans] " Francisco J Ballesteros
2007-08-16 14:01 ` David Leimbach
2007-08-16 14:39   ` erik quanstrom
2007-08-16 15:58   ` maht
2007-08-16 17:45     ` David Leimbach
2007-08-16 19:01       ` ron minnich
2007-08-16 19:37         ` Robert Sherwood
2007-08-16 20:49           ` David Leimbach
2007-08-17  8:42             ` Douglas A. Gwyn
2007-08-17 13:00               ` ron minnich
2007-08-17 13:24                 ` erik quanstrom
2007-08-17 13:35                   ` plan9
2007-08-17 14:22                     ` ron minnich
2007-08-17 14:29                       ` David Leimbach
2007-08-17 14:29                         ` Richard Miller
2007-08-17 14:49                         ` ron minnich
2007-08-17 17:49                           ` David Leimbach
2007-08-17 18:09                             ` Charles Forsyth
2007-08-20  8:48                   ` Douglas A. Gwyn
2007-08-20  8:48                 ` Douglas A. Gwyn
2007-08-20 14:29                   ` Douglas A. Gwyn
2007-08-20 14:53                     ` Francisco J Ballesteros
2007-08-20 15:02                     ` Rob Pike
2007-08-21  8:48                       ` Douglas A. Gwyn
2007-08-21  8:47                     ` [9fans] " jsnx
2007-08-21  8:47                 ` jsnx
2007-08-23  8:50                   ` Douglas A. Gwyn
2007-08-24  8:39                 ` jsnx
2007-08-29  9:06                   ` Douglas A. Gwyn
2007-08-30  8:35                 ` jsnx
2007-08-30 13:18                   ` David Leimbach
2007-08-31  9:07                     ` Douglas A. Gwyn
2007-08-31 18:04                       ` Joel C. Salomon
2007-09-01 12:07                         ` Uriel
2007-09-02  1:11                           ` Joel C. Salomon
2007-09-02  2:14                             ` erik quanstrom
2007-09-02  5:01                               ` Anthony Martin
2007-09-02 13:00                             ` Uriel
2007-09-02 16:53                               ` Joel C. Salomon
2007-09-03  7:50                                 ` Uriel
2007-09-03 16:40                                   ` Joel C. Salomon
2007-09-03 19:51                                     ` Uriel
2007-09-09 21:41                                   ` roger peppe
2007-09-03  9:27                             ` Douglas A. Gwyn
2007-09-03 11:03                               ` Charles Forsyth
2007-08-17 14:27               ` [9fans] " David Leimbach
2007-08-17  4:11           ` Skip Tavakkolian
2007-08-17  8:42     ` [9fans] " jsnx
2007-08-17 13:25       ` erik quanstrom
2007-08-17  0:39   ` [9fans] " Uriel
2007-08-17  8:59     ` matt
2007-08-17 12:05       ` erik quanstrom
2007-08-20  8:47       ` [9fans] " jsnx
2007-08-20  9:00         ` Francisco J Ballesteros
2007-08-20 11:34           ` Tom Lieber
2007-08-20 11:40             ` erik quanstrom
2007-08-20 13:33               ` Uriel
2007-08-20 17:36             ` Paweł Lasek
2007-08-20 18:26               ` erik quanstrom
2007-08-20 18:48                 ` Paweł Lasek [this message]
2007-08-20 19:52               ` Dave Eckhardt
2007-08-20 21:28                 ` Robert William Fuller
2007-08-20 21:40                   ` erik quanstrom
2007-08-20 22:05                     ` Robert William Fuller
2007-08-21 11:29                       ` Brantley Coile
2007-08-21 17:54                       ` Robert Raschke
2007-08-22  7:38                         ` andrey mirtchovski
2007-08-20 22:12                     ` David Leimbach
2007-08-21  0:37                       ` dave.l
2007-08-21  1:14                         ` David Leimbach
2007-08-21  1:25                           ` Uriel
2007-08-21  1:44                             ` David Leimbach
2007-08-21  8:48                             ` app
2007-08-22  8:47                             ` jsnx
2007-08-22  9:54                             ` app
2007-08-22 11:22                               ` roger peppe
2007-08-22 11:30                               ` erik quanstrom
2007-08-23  8:49                             ` jsnx
2007-08-21  1:26                         ` Roman Shaposhnick
2007-08-21  1:28                           ` Uriel
2007-08-22  8:47                     ` jsnx
2007-08-20 21:57                   ` Uriel
2007-08-20 22:08                     ` Robert William Fuller
2007-08-21  8:48             ` jsnx
2007-08-20 11:17         ` erik quanstrom
2007-08-20 17:40         ` Roman Shaposhnick
2007-08-20 17:52           ` Uriel
2007-08-23  8:49           ` jsnx
2007-08-23 10:35             ` Steve Simon
2007-08-24  8:40             ` jsnx
2007-08-24  8:57               ` Martin Neubauer
2007-08-24 10:55               ` David Leimbach
2007-09-06  4:06                 ` Roman Shaposhnik
2007-08-29  9:06               ` jsnx
2007-08-30  1:41                 ` Uriel
2007-09-06  5:06                 ` Roman Shaposhnik
2007-08-29  9:06             ` jsnx
2007-08-23 15:29           ` Douglas A. Gwyn
2007-08-21  8:48         ` jsnx
2007-08-21 11:22           ` Uriel
2007-08-21 15:05           ` Skip Tavakkolian
2007-08-20  8:48     ` [9fans] " Douglas A. Gwyn
2007-08-17  8:42 ` [9fans] " jsnx

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=9f3897940708201148s3d1300abl81baa04ca8e30f19@mail.gmail.com \
    --to=pawel.lasek@gmail.com \
    --cc=9fans@cse.psu.edu \
    /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 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).