Page MenuHomeFreeBSD

Make md(4) support GEOM::ident.
ClosedPublic

Authored by trasz on Sep 5 2017, 12:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 3 2024, 2:02 AM
Unknown Object (File)
Sep 26 2024, 10:07 PM
Unknown Object (File)
Sep 26 2024, 9:52 PM
Unknown Object (File)
Sep 26 2024, 9:45 PM
Unknown Object (File)
Sep 26 2024, 9:40 PM
Unknown Object (File)
Sep 26 2024, 9:38 PM
Unknown Object (File)
Sep 26 2024, 9:37 PM
Unknown Object (File)
Sep 26 2024, 9:36 PM
Subscribers

Details

Summary

Make md(4) support GEOM::ident. For swap- and malloc-backed disks
it's random; for vnode-backed ones it's based on backing file device
and inode numbers.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/dev/md/md.c
1300 ↗(On Diff #32670)

This allows duplicated idents.

What is the purpose of the field ?

1419 ↗(On Diff #32670)

Did you build-tested this on 32bit arches ?

sys/dev/md/md.c
1300 ↗(On Diff #32670)

You mean, 32 bits are not enough to guarantee uniqueness?

As for the purpose - in this case (generally: in cases other than vnode) it doesn't serve any purpose. Perhaps I should just remove it for cases other than vnode?

1419 ↗(On Diff #32670)

Not yet.

sys/dev/md/md.c
1300 ↗(On Diff #32670)

I mean that two arc4random() call makes no guarantee about uniqueness of the result.

You add some feature and do not explain its purpose, more, you state that in some cases the feature has no purpose.

I don't see a point in reporting random ident strings. Those are normally useful to make things persistent, but random is not a way for that. May be I'd see it more useful to have it user-configurable.

Get rid of random idents; they don't serve any purpose.

This revision was automatically updated to reflect the committed changes.