direct-io.hg

changeset 12352:60a4af3d243f

PV-on-HVM: Do not enable barriers in blkfront before 2.6.16

Barrier support was rewritten after 2.6.15. Perhaps it would be
possible to implement support for old kernels as well but for now it
is easier to just disable them.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Fri Nov 10 12:34:26 2006 +0000 (2006-11-10)
parents ac10e3047f36
children 2df2acc05721
files linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c	Fri Nov 10 12:27:56 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c	Fri Nov 10 12:34:26 2006 +0000
     1.3 @@ -351,6 +351,7 @@ xlvbd_del(struct blkfront_info *info)
     1.4  	info->rq = NULL;
     1.5  }
     1.6  
     1.7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
     1.8  int
     1.9  xlvbd_barrier(struct blkfront_info *info)
    1.10  {
    1.11 @@ -364,3 +365,11 @@ xlvbd_barrier(struct blkfront_info *info
    1.12  	       info->gd->disk_name, info->feature_barrier ? "enabled" : "disabled");
    1.13  	return 0;
    1.14  }
    1.15 +#else
    1.16 +int
    1.17 +xlvbd_barrier(struct blkfront_info *info)
    1.18 +{
    1.19 +	printk("blkfront: %s: barriers disabled\n", info->gd->disk_name);
    1.20 +	return -ENOSYS;
    1.21 +}
    1.22 +#endif