Re: [PATCH] Btrfs: calc file extent num_bytes correctly in file clone

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

 



minor, typos in comments s/substract/subtract/

On Wed, Aug 24, 2011 at 02:13:16PM +0800, Li Zefan wrote:
> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
> index 660a6c8..3351b1b 100644
> --- a/fs/btrfs/ioctl.c
> +++ b/fs/btrfs/ioctl.c
> @@ -2331,14 +2331,21 @@ static noinline long btrfs_ioctl_clone(struct file *file, unsigned long srcfd,
>  
>  			if (type == BTRFS_FILE_EXTENT_REG ||
>  			    type == BTRFS_FILE_EXTENT_PREALLOC) {
> +				/*
> +				 *    a  | --- range to clone ---|  b
> +				 * | ------------- extent ------------- |
> +				 */
> +
> +				/* substract range b */
...

> +				if (key.offset + datal > off + len)
> +					datal = off + len - key.offset;
> +
> +				/* substract range a */
...

>  				if (off > key.offset) {
>  					datao += off - key.offset;
>  					datal -= off - key.offset;
>  				}
>  
> -				if (key.offset + datal > off + len)
> -					datal = off + len - key.offset;
> -
>  				ret = btrfs_drop_extents(trans, inode,
>  							 new_key.offset,
>  							 new_key.offset + datal,
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux