Page MenuHomeFreeBSD

loader: update symlink support in zfs reader
ClosedPublic

Authored by tsoome on Feb 21 2017, 8:27 PM.
Tags
None
Referenced Files
F106177485: D9706.diff
Thu, Dec 26, 4:21 PM
Unknown Object (File)
Sat, Dec 21, 3:54 PM
Unknown Object (File)
Thu, Dec 5, 5:43 PM
Unknown Object (File)
Thu, Dec 5, 7:39 AM
Unknown Object (File)
Tue, Dec 3, 3:42 PM
Unknown Object (File)
Mon, Dec 2, 8:26 PM
Unknown Object (File)
Fri, Nov 29, 8:30 AM
Unknown Object (File)
Nov 24 2024, 10:27 PM
Subscribers

Details

Summary

As the current zfs file system is providing symlink via system attributes, need to update the code accordingly.

Test Plan

Tested by browsing and reading different symlinks and by using names like /usr/bin/../lib, bin/.., etc/., etc/./inet, ./bin

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 7612
Build 7762: arc lint + arc unit

Event Timeline

tsoome retitled this revision from to loader: update symlink support in zfs reader.
tsoome updated this object.
tsoome edited the test plan for this revision. (Show Details)
tsoome added reviewers: allanjude, imp.
avg edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 22 2017, 8:20 AM
smh requested changes to this revision.Feb 22 2017, 9:31 AM
smh edited edge metadata.
smh added inline comments.
sys/boot/zfs/zfsimpl.c
2273

All of the above are only used in == DMU_OT_SA case so could be moved into that block with char *p;

2294

Does the boot code make use of SET_ERROR, I'm guessing not?

2382

Missing space

This revision now requires changes to proceed.Feb 22 2017, 9:31 AM
tsoome added inline comments.
sys/boot/zfs/zfsimpl.c
2294

no, it does not.

tsoome edited edge metadata.
tsoome marked an inline comment as done.

Fixes suggested by smh.

sys/boot/zfs/zfsimpl.c
2282

Just spotted that if you invert the condition you get an arguably cleaner flow e.g.

 else {
    if ((dn->dn_flags & DNODE_FLAG_SPILL_BLKPTR) == 0)
        return (EIO);

    blkptr_t *bp = &dn->dn_spill;

    size = BP_GET_LSIZE(bp);
    ...
}
tsoome edited edge metadata.

svn update; and clean up the inverted if statement.

smh edited edge metadata.

LGTM

This revision is now accepted and ready to land.Feb 22 2017, 1:42 PM
allanjude edited edge metadata.

Approved By: allanjude

This revision was automatically updated to reflect the committed changes.