Re: Optimizing chmod(1)

2016-03-14 Thread Michael McConville
Adam Thompson wrote: > > On 16-03-13 11:11 PM, Michael McConville wrote: > >It seems that chown(1) will write to a file even if it already has the > >desired ownership. The below patch causes it to skip the write when > >there would be no change. The best I could tell, the fts_read(3) and > >fchow

Re: Optimizing chmod(1)

2016-03-14 Thread Adam Thompson
On 16-03-13 11:11 PM, Michael McConville wrote: It seems that chown(1) will write to a file even if it already has the desired ownership. The below patch causes it to skip the write when there would be no change. The best I could tell, the fts_read(3) and fchownat(3) logic agree on whether to fo

Re: Optimizing chmod(1)

2016-03-13 Thread Philip Guenther
On Sun, Mar 13, 2016 at 9:11 PM, Michael McConville wrote: > It seems that chown(1) will write to a file even if it already has the > desired ownership. The below patch causes it to skip the write when > there would be no change. The best I could tell, the fts_read(3) and > fchownat(3) logic agree

Optimizing chmod(1)

2016-03-13 Thread Michael McConville
It seems that chown(1) will write to a file even if it already has the desired ownership. The below patch causes it to skip the write when there would be no change. The best I could tell, the fts_read(3) and fchownat(3) logic agree on whether to follow symlinks in all cases, so there's no need to e