All of lore.kernel.org
 help / color / mirror / Atom feed
* user-space cmd/lib to compute hash filename ordering?
@ 2003-09-10 14:04 Bennett Todd
  2003-09-11  7:17 ` Yury Umanets
  0 siblings, 1 reply; 3+ messages in thread
From: Bennett Todd @ 2003-09-10 14:04 UTC (permalink / raw)
  To: reiserfs-list

[-- Attachment #1: Type: text/plain, Size: 904 bytes --]

I'm continuing to work on my new software packaging system.

I'm going to have to make a custom archive-builder, stock cpio isn't
suitable even though the file format will be cpio, since the pkg
creator needs to have explicit control over the owner/group/perms
of the files installed without having the package building user
actually able to set those perms on real files.

Since I'm going to need to create my own cpio file builder, and
since I've decided to teach it how to order files in the archives
(so it can put the metadata and manifest info up at the front for
quick access) I'm thinking it'd be sexy to add a --reiser option
that orders all the files in the archive in reiserfs hash order, so
a simple naive unpack will deposit files in the most efficient
fashion into a Reiserfs filesystem.

Is there a library routine or cmdline utility I can use to compute
this ordering?

Thanks,

-Bennett

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: user-space cmd/lib to compute hash filename ordering?
  2003-09-10 14:04 user-space cmd/lib to compute hash filename ordering? Bennett Todd
@ 2003-09-11  7:17 ` Yury Umanets
  2003-09-11 13:16   ` Bennett Todd
  0 siblings, 1 reply; 3+ messages in thread
From: Yury Umanets @ 2003-09-11  7:17 UTC (permalink / raw)
  To: Bennett Todd; +Cc: reiserfs-list

On Wed, 2003-09-10 at 18:04, Bennett Todd wrote:
> I'm continuing to work on my new software packaging system.
> 
> I'm going to have to make a custom archive-builder, stock cpio isn't
> suitable even though the file format will be cpio, since the pkg
> creator needs to have explicit control over the owner/group/perms
> of the files installed without having the package building user
> actually able to set those perms on real files.
> 
> Since I'm going to need to create my own cpio file builder, and
> since I've decided to teach it how to order files in the archives
> (so it can put the metadata and manifest info up at the front for
> quick access) I'm thinking it'd be sexy to add a --reiser option
> that orders all the files in the archive in reiserfs hash order, so
> a simple naive unpack will deposit files in the most efficient
> fashion into a Reiserfs filesystem.
> 
Hello,

> Is there a library routine or cmdline utility I can use to compute
> this ordering?

Actually you can use libreiserfs (progsreierfs package) or standard
reiserfsprogs. They both contains routines for generating hashes,
reiserfs supports them.

But probably it is better to cut them out and write small and simple cmd
tool for hashes generating.

Besides, there should lots of tools for generating different hashes.
They (tools) are used for discovering for instance how often particular
hash function generates collided hashes.

If you are interested, I will find out details.
> 
> Thanks,
> 
> -Bennett

-- 
umka


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: user-space cmd/lib to compute hash filename ordering?
  2003-09-11  7:17 ` Yury Umanets
@ 2003-09-11 13:16   ` Bennett Todd
  0 siblings, 0 replies; 3+ messages in thread
From: Bennett Todd @ 2003-09-11 13:16 UTC (permalink / raw)
  To: Yury Umanets; +Cc: reiserfs-list

[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]

2003-09-11T03:17:49 Yury Umanets:
> If you are interested, I will find out details.

Thanks anyway, I get the message that a stock, standard distro of
ReiserFS doesn't have a single, consistent way to lay hands on the
available hashes for purposes like this, so if I do ever do it, I'll
be making my tool dependent on the ReiserFS dev tooling.

If someone wanted to enhance ReiserFS to make this job easier for
people, I've got a recommendation: include a reiserfs_hashsort
filter, reads a list of full pathnames from stdin, takes a hash name
as a cmdline arg, and prints the files sorted according to that
hash; slap that between the find that generates filenames and the
cpio that packs 'em, and you get a ReiserFS-tuned archive order.

I may pursue doing that eventually, but it's somewhere pretty far
down on my priority list at the moment. In other words, if it had
been there, I'd have used it, but it'll take me a while to get
around to coding it up myself.

Thanks again for the very helpful answer --- "no, what you want
isn't there, here's how you'd go about constructing it" is every bit
as valuable as "yes, here's where to find it". Maybe even more so,
negative answers are harder to research.

-Bennett

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-11 13:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-10 14:04 user-space cmd/lib to compute hash filename ordering? Bennett Todd
2003-09-11  7:17 ` Yury Umanets
2003-09-11 13:16   ` Bennett Todd

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.