Page MenuHomeFreeBSD

fuse extattrs: fix issue when neither uio nor size were not passed to VOP_*.
AbandonedPublic

Authored by fsu on Dec 14 2017, 7:45 AM.

Details

Reviewers
cem
pfg
asomers
Summary

After I started playing with linuxulator and xattrs, I found some mistakes in ext2fs and fuse extattrs logic.
Here is fixes for some problems, which I met.

Test Plan

The fuse extattrs tests will be included to test plan for https://reviews.freebsd.org/D13209
when linuxulator xattrs will be finished.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

fsu created this revision.Dec 14 2017, 7:45 AM
pfg added a comment.Dec 14 2017, 2:27 PM

Cosmetic changes don't need to be in the Differential Review: they just distract us from the main changes.
Send me a diff privately and I will approve them.

fs/fuse/fuse_vnops.c
1991

Not enough context, but I assume fdi can be uninitialized.

2005

Most of these changes seem cosmetic and should be committed independently.

2035

cosmetic.

2089

Same as above (cosmetic).

2307

I haven't checked if fdi needs to be initialized (perhaps later).
Otherwise, these are all cosmetic.

fsu added a comment.Dec 15 2017, 7:43 AM

Seems like, it is not clearly understandable what was fixed. Ok, let me explain:

  • The was a bug in list() function when uio was not passed, the size of linux list (not converted to bsd was returned).
  • Case when neither uio nor size were not passed to list() and get(), this logic could be used to check does extattr with some key exist or not.

If it is strongly required, I can separate the variables initialization and cosmetic to another patch.
So, may be let wait some time the comments from @cem, if not I will send the patch to @pfg for approve.

fs/fuse/fuse_vnops.c
1991

I decided that I will not zero it is because it is not zero it in other places. So, it should be done by fdisp_init(); and fdisp_make_vp().

cem added a comment.Dec 15 2017, 5:30 PM
In D13487#282200, @fsu wrote:

So, may be let wait some time the comments from @cem, if not I will send the patch to @pfg for approve.

I was/am waiting for the cosmetic and functional changes to be split :-).

fsu added a comment.Dec 18 2017, 8:09 AM

Ok), logic fixes are extracted in https://reviews.freebsd.org/D13528.

fsu added a comment.Jan 2 2018, 8:26 AM

Also, cosmetic changes are extracted in https://reviews.freebsd.org/D13737.

pfg added a reviewer: asomers.Apr 27 2019, 2:27 PM

Is this still a valid review? I recall something related was committed.

Indeed, this seems to have been abandoned and recreated as D13528, then committed as r338152. @fsu is there any reason not to close this review?

fsu abandoned this revision.Apr 27 2019, 4:17 PM

Indeed, this seems to have been abandoned and recreated as D13528, then committed as r338152. @fsu is there any reason not to close this review?

Yep, it was spitted to https://reviews.freebsd.org/D13528 and https://reviews.freebsd.org/D13737.
So, it should be abandoned.