[PATCH] vfs_streams_xattr: Do not attempt to write empty attributetwice
realrichardsharpe at gmail.com
Fri Jun 14 07:15:50 MDT 2013
On Thu, Jun 13, 2013 at 2:18 PM, Christof Schmitt
<christof.schmitt at us.ibm.com> wrote:
> On Thu, Jun 13, 2013 at 03:56:23PM -0400, Scott Lovenberg wrote:
>> On Thu, Jun 13, 2013 at 3:50 PM, Volker Lendecke
>> <Volker.Lendecke at sernet.de> wrote:
>> > That is probably true. But I think that this should be made
>> > obvious with braces. I find the operator precedence of || vs
>> > && less than obvious, and a bit of redundancy does not hurt
>> > here I guess.
>> > Looking at that whole routine, I think the general logic
>> > could be simplified quite a bit. (I know, much of that stuff
>> > is mine...)
>> > Volker
>> Yeah, I didn't even consider operator order until the second glance.
>> The binary will probably be the same either way and Volker's advise
>> makes the code much more readable.
> Attached is an updated version of the patch with the braces added. My
> preference would be to fix the problem before restructuring the code,
> but i can still take a look.
> Volker, how would you simplify this function?
For my part the change looks correct.
However, the issue I have with storing streams in XATTRs is that each
stream should act like a real file. That means that you could write
one sector to offset 0 and another sector to offset 512. That semantic
is hard to handle with XATTRs and the module the way it is.
More information about the samba-technical