As suggested in r167010, use the structure type and macros to access and
modify UFS2 extended attributes.
PR: 216127
Reported by: dewayne at heuristicsystems.com.au
Sponsored by: Dell EMC Isilon
Differential D9225
ffs_vnops: Simplify extattr access cem on Jan 17 2017, 7:54 PM. Authored by Tags None Referenced Files
Subscribers None
Details
As suggested in r167010, use the structure type and macros to access and PR: 216127
Diff Detail
Event TimelineComment Actions This is fine, but I have one suggestion. In each place which casts char * into the structure, verify the alignment. This might be not strictly needed right now, since from what I see the pointers are malloced, but might help if the code starts mutating in future. I am not sure whether the checks should be asserts or silently return error. Comment Actions Sure, that seems like a good idea. I wasn't too concerned about it because the code takes care to keep struct extattrs (and contents) 8-byte aligned -- and I don't think we require greater alignment outside of e.g. SSE/AVX values.
|