From: Jeff Mahoney <jeffm@suse.com>
To: "Grzegorz Jaśkiewicz" <gryzman@gmail.com>
Cc: ReiserFS List <reiserfs-list@namesys.com>
Subject: Re: hashes in reiser3.6
Date: Sun, 28 Nov 2004 14:30:36 -0500 [thread overview]
Message-ID: <41AA275C.7030909@suse.com> (raw)
In-Reply-To: <2f4958ff04112015003b0bca9e@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Grzegorz Ja≈õkiewicz wrote:
| On Thu, 18 Nov 2004 15:16:29 -0500, Jeff Mahoney <jeffm@novell.com> wrote:
|
|
|>If the filesystem is already established, you can't switch hashes. The
|>hash is global to the filesystem, so if you were to change it, lookups
|>would fail and you wouldn't be able to find any of your files.
|>
|>If you're creating a new filesystem, you can use the --hash argument to
|>mkreiserfs. Under most circumstances, the filesystem code will
|>automatically discover which hash you're using at mount time.
|
|
| Thanks, but the trick is that I would like to switch over existing
| partition to other hash.
| I know, I can copy over all data on side, and recreate partition from
| scratch, but it's just way too painfull. It should be possible to do
| this in much easier way.
| So you say, that reiserfs doesn't store filenames in strucures, but
| uses just hashes to lookup ? Shouldn't it be possible to go through
| all structures on the partition, and recreate hashes, but using
| different key function ?
| I am prepared to spend some time,and do this.
|
As Vladimir said, you'd need to write a special tool to do this. It
would be far more cost effective to use a spare drive or tape backup to
backup your filesystem and restore it again.
To highlight why this would be such a complex operation, consider that
the hashed entries are sorted by the hash. With small directories, this
is fairly trivial since you can just shuffle the entries around inside
the same item. However, with a large directory (where large is defined
as the length of all filenames + associated keys is larger than a disk
block), the directory can be split over several nodes. Once you start
shuffling nodes around, you're essentially rebuilding the tree, and
that's far more complex and time consuming than simply copying the data
off and restoring it back.
Sorry we don't have an easier answer for you. :(
- -Jeff
- --
Jeff Mahoney
SuSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBqidcLPWxlyuTD7IRAnb9AJ93lAymaFd2O6jotBU/56nU77e5bgCdF124
KzpH9IKqR+nG0c+jIGDTN98=
=UDnU
-----END PGP SIGNATURE-----
prev parent reply other threads:[~2004-11-28 19:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-18 19:45 hashes in reiser3.6 Grzegorz Jaśkiewicz
2004-11-18 20:16 ` Jeff Mahoney
2004-11-20 23:00 ` Grzegorz Jaśkiewicz
2004-11-25 9:03 ` Vladimir Saveliev
2004-11-28 19:30 ` Jeff Mahoney [this message]
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=41AA275C.7030909@suse.com \
--to=jeffm@suse.com \
--cc=gryzman@gmail.com \
--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.