All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Reiser <reiser@namesys.com>
To: David Dabbs <david@dabbs.net>
Cc: reiserfs-list@namesys.com
Subject: Re: Fibration questions
Date: Sun, 18 Jul 2004 00:11:31 -0700	[thread overview]
Message-ID: <40FA22A3.5060503@namesys.com> (raw)
In-Reply-To: <20040716103441.2BA8715C1D@mail03.powweb.com>

David Dabbs wrote:

>
>
>Using the fibre for fast extension testing
>A common filesystem client query is for '*.xxx'. If there were (is?) an
>alternate readdir[64]() interface that allowed the caller to pass an
>'extension mask/filter,' then the fibre could be leveraged to quickly test
>whether a given file matches the mask without calling unpack_string(), etc.
>Kind of like saying to the filesystem: 
>
>	SELECT filename WHERE dir = '/home' AND filename LIKE '%.xxx'
>
>A 'fibration map' would need to be specified in an array, say
>
>	const char * fibre_map[] = {"c", "h", "o"...};
>
>or using a structure like
>
>	struct fibre_map_ent {
>		unsigned char fibrno;
>		unsigned char *exten;
>	};
>
>	#define FIBR_MAX 127
>	#define FIBR_DEFAULT FIBR_MAX-1
>	/* should be ordered by exten for searching */
>	const struct fibre_map_ent map[] = 
>	{
>		{.fibrno=6, 	exten="bar"},
>		{.fibrno=0, 	exten="c"},
>		{.fibrno=1, 	exten="h"},
>		{.fibrno=3, 	exten="htm"},
>		{.fibrno=3, 	exten="html"},
>		{.fibrno=2, 	exten="java"},
>		{.fibrno=FIBR_MAX, exten="o"},
>		{.fibrno=4, 	exten="pl"},
>		{.fibrno=5, 	exten="py"}
>		{.fibrno=7, 	exten="xml"}
>	};
>
>	/* 
>		failure to find a match returns 
>
>			FIBRE_NO(FIBR_DEFAULT);
>		else
>
>			FIBRE_NO(map[i].fibro);
>
>
>The enhanced readdir would lookup the mask. If found, it would use the
>fibrno to select appropriate directory entries for the readdir stream.
>Otherwise, it would execute the default readdir code. Of course, this map
>would need to be the global default for the filesystem and per-directory
>fibration override would be prohibited, otherwise readdir would return
>incorrect results.
>
>
>
>  
>
I think this is too implementation dependent of an optimization to be 
allowed to influence API design. 

There is a need for support for * in filename queries.  I would support 
adding that to sys_reiser4.

If FS naming was better designed, filenames would not have extensions.  
I prefer to first better design naming, and then not need to optimize 
the API for extensions.

  parent reply	other threads:[~2004-07-18  7:11 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-16 10:35 Fibration questions David Dabbs
2004-07-16 11:04 ` Nikita Danilov
2004-07-16 17:45   ` David Dabbs
2004-07-18  7:11 ` Hans Reiser [this message]
2004-07-18  7:47   ` David Dabbs
2004-07-19  4:23   ` David Masover
2004-07-19  7:21     ` David Dabbs
2004-07-19 21:34       ` David Masover
2004-07-19 22:06         ` Valdis.Kletnieks
2004-07-19 22:32         ` David Dabbs
2004-07-20  6:03           ` Hans Reiser
2004-07-20  7:03           ` David Masover
2004-07-20  5:30         ` Hans Reiser
2004-07-20  7:07           ` David Masover
2004-07-20  8:31             ` David Dabbs
2004-07-21  5:13               ` David Masover
2004-07-21  5:44                 ` David Dabbs
2004-07-21  6:20                   ` David Masover
2004-07-21  6:36                     ` David Dabbs
2004-07-21  8:32                       ` mjt
2004-07-22  4:08                         ` David Masover
2004-07-22 10:06                           ` mjt
2004-07-22 18:14                             ` Hans Reiser
2004-07-23  2:45                             ` David Masover
2004-07-23  9:42                               ` mjt
2004-07-23 18:21                                 ` David Masover
2004-07-22 10:10                           ` Vitaly Fertman
2004-07-23  2:43                             ` David Masover
2004-07-23  9:09                               ` Vitaly Fertman
2004-07-26  6:28                                 ` Hans Reiser
2004-07-26 10:11                                   ` Vitaly Fertman
2004-07-23  9:59                             ` Christian Mayrhuber
2004-07-23  9:59                               ` mjt
2004-07-23 18:13                                 ` David Masover
2004-07-23 10:05                               ` mjt
2004-07-22  8:03                     ` Hans Reiser
2004-07-22 12:16                       ` Nikita Danilov
2004-07-22 14:39                         ` mjt
2004-07-22 18:17                           ` Hans Reiser
2004-07-22 18:26                             ` mjt
2004-07-22 19:57                           ` Valdis.Kletnieks
2004-07-22 21:05                             ` mjt
2004-07-22 21:36                               ` Valdis.Kletnieks
2004-07-23  9:28                                 ` mjt
2004-07-23 22:42                                   ` Valdis.Kletnieks
2004-07-23  2:40                         ` David Masover

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=40FA22A3.5060503@namesys.com \
    --to=reiser@namesys.com \
    --cc=david@dabbs.net \
    --cc=reiserfs-list@namesys.com \
    /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.