Re: [PATCH 1/1] hfsplus: skip unnecessary volume header sync

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2014-07-17 at 13:59 -0700, Andrew Morton wrote:
> On Thu, 17 Jul 2014 19:32:42 +0300 Sougata Santra <sougata@xxxxxxxxxx> wrote:
> 
> > hfsplus_sync_fs always updates volume header information to disk with every
> > sync. This causes problem for systems trying to monitor disk activity to
> > switch them to low power state.
> 
> Please fully describe these "problems"?  I'm guessing that the fs will
> write the volume header even if it didn't change, so a sync operation
> against a completely clean fs still performs a physical write.  But I'd
> prefer not to have to guess!

Absolutely sorry, I assumed it was made clear from the cover letter.
Yes, as you described, the problem is that HFS+ syncs volume header
even if it did not change with every sync operation. Also, I have
done some additional changes because I was modifying hfsplus_sync_fs,
and the problems were relevant, and I thought they should be addressed
in the same patch. Please find them below:

Please Note:
-----------
1) hfsplus_sync_volume_header() is added to call from mount/unmount
sequence, since we just want to write the dirty/clean state to disk.
For unmount, hfsplus_sync_fs is already called from sync_filesystem(). 
For mount, it gets called from delayed_sync_fs().

2) Also, there was a error in error propagation. It it also fixed in 
this patch.
-->snip<--
if (!error)
        error2 = error;
-->snap<--

3) The disk is only flushed if there was no error. Previously it was
always flushed without checking the error.

Thanks a lot,

Best regards,
    Sougata
> 
> > Also hfsplus_sync_fs is explicitly called
> > from mount/unmount, which is unnecessary. During mount/unmount we only want
> > to set/clear volume dirty sate.


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux