From: Linus Torvalds Date: Wed, 25 Mar 2009 00:11:40 GMT Subject: Re: fatal: unable to write sha1 file git 1.6.2.1 Message-ID: In-Reply-To: <20090324193506.0962b28e@tupile.poochiereds.net> On Tue, 24 Mar 2009, Jeff Layton wrote: > > Yes. That's probably the right thing to do here. This is looks like a > regression that I introduced some time ago in > cea218054ad277d6c126890213afde07b4eb1602. Before that delta we always > flushed all the data before doing any setattr. After that delta, we > just did it on size changes. In a later commit, Steve fixed it so that > it got done on ATTR_MTIME too. Ahh. Yes. You do need to flush on at least ATTR_MODE and ATTR_UID/GID changes too. > I wonder though whether that's sufficient. If we're changing ownership > for instance, will we hit the same issue? Maybe the safest approach is > just to go back to flushing on any setattr call. > > Steve, thoughts? Is there anything relevant left to be sufficient reason to make it conditional? Once you're doing it on MODE/SIZE/UID/GID/MTIME changes, that pretty much will cover all set_attr calls. Linus