Re: [RFC PATCH 01/11] vfs: push __sync_blockdev calls down into sync_fs routines

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

 



> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -1097,7 +1097,7 @@ xfs_fs_sync_fs(
>  	 * Doing anything during the async pass would be counterproductive.
>  	 */
>  	if (!wait)
> -		return 0;
> +		goto out;
>  
>  	xfs_log_force(mp, XFS_LOG_SYNC);
>  	if (laptop_mode) {
> @@ -1108,8 +1108,8 @@ xfs_fs_sync_fs(
>  		 */
>  		flush_delayed_work(&mp->m_log->l_work);
>  	}
> -
> -	return 0;
> +out:
> +	return __sync_blockdev(sb->s_bdev, wait);

XFS never uses the block device mapping for anything, so this is
not needed.

> +/*
> + * Many legacy filesystems don't have a sync_fs op. For them, we just flush
> + * the block device (if there is one).
> + */
> +static inline int call_sync_fs(struct super_block *sb, int wait)
> +{
> +	if (sb->s_op->sync_fs)
> +		return sb->s_op->sync_fs(sb, wait);
> +	return __sync_blockdev(sb->s_bdev, wait);
> +}

The proper name for this would be vfs_sync_fs.  And I don't think it
warrants an inline.



[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