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)
Feb 20 2024, 10:02 PM
Unknown Object (File)
Feb 9 2024, 12:00 AM
Unknown Object (File)
Dec 20 2023, 4:32 AM
Unknown Object (File)
Nov 7 2023, 12:25 AM
Unknown Object (File)
Nov 5 2023, 7:08 PM
Unknown Object (File)
Nov 1 2023, 10:49 PM
Unknown Object (File)
Nov 1 2023, 3:07 PM
Unknown Object (File)
Oct 28 2023, 4:52 AM
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.