Re: [PATCH 5/5 v4] brd: Add getgeo to block ops for fdisk

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

 



On 11/05/2014 05:14 PM, Boaz Harrosh wrote:
> From: Boaz Harrosh <boaz@xxxxxxxxxxxxx>
> 
Sorry

[V4]
  Also fix the cryptic comment at the source code.

I have pushed new trees to the public tree as well

Thanks
Boaz

<>
> +static int brd_getgeo(struct block_device *bd, struct hd_geometry *geo)
> +{
> +	/* With the usual emulated values of 64, 32, X and the
> +	 * default size of 4M device, fdisk will offer 40 as possible
> +	 * first-sector.
> +	 * But with the values presented here of 1, 1, 1 fdisk will
> +	 * offer 8 (4K) as possible first sector.
> +	 * Otherwise, either way, it effects nothing. Only fdisk calls
> +	 * this vector at all.
> +	 */
> +	geo->heads = 1;
> +	geo->sectors = 1;
> +	geo->cylinders = 1;
> +	return 0;
> +}
> +
>  static const struct block_device_operations brd_fops = {
>  	.owner =		THIS_MODULE,
>  	.rw_page =		brd_rw_page,
> @@ -433,6 +450,7 @@ static const struct block_device_operations brd_fops = {
>  #ifdef CONFIG_BLK_DEV_XIP
>  	.direct_access =	brd_direct_access,
>  #endif
> +	.getgeo =		brd_getgeo,
>  };
>  
>  /*
> 

--
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