Re: [RFC Patch]: scsi: sysfs file cache_type not in sync with mode page

2014-06-09 Thread Vishwanath Pai
In order to issue a BLKRRPART the drive needs to be unmounted first, this is not always possible on a machine. There is another way though: 'echo 1 > /sys/block/sda/device/rescan'. This rescans all the mode pages so that the kernel is in sync. Writing to cache_type does seem to be a better idea

Re: [RFC Patch]: scsi: sysfs file cache_type not in sync with mode page

2014-06-06 Thread Douglas Gilbert
On 14-06-06 06:55 PM, James Bottomley wrote: On Fri, 2014-06-06 at 17:14 -0400, Pai wrote: Hi All, I noticed that the sysfs file cache_type is not is sync with the information in the mode page. If we change the WCE attribute in the mode page (sdparm --set=WCE /dev/sda and sdparm --clear=WCE

Re: [RFC Patch]: scsi: sysfs file cache_type not in sync with mode page

2014-06-06 Thread James Bottomley
On Fri, 2014-06-06 at 17:14 -0400, Pai wrote: > Hi All, > > I noticed that the sysfs file cache_type is not is sync with the information > in the mode page. If we change the WCE attribute in the mode page (sdparm > --set=WCE /dev/sda and sdparm --clear=WCE /dev/sda) it does not reflect this >

[RFC Patch]: scsi: sysfs file cache_type not in sync with mode page

2014-06-06 Thread Pai
Hi All, I noticed that the sysfs file cache_type is not is sync with the information in the mode page. If we change the WCE attribute in the mode page (sdparm --set=WCE /dev/sda and sdparm --clear=WCE /dev/sda) it does not reflect this in the sysfs file. $ cat /sys/block/sda/device/scsi_disk/