[PATCH] SYNCHRONIZE_CACHE on umount

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

 



Hi.
When a SCSI HDD(WCE bit is set) is umounted, SYNCHRONIZE_CACHE(35h)
command is not issued under current sd driver.

When an IDE HDD is umounted, FLUSH CACHE is issued through
idedisk_release().
I suppose that the sd driver also needs to flush cache through umount.

Thanks.

Signed-off-by: Hifumi Hisashi <hifumi.hisashi@xxxxxxxxxxxxx>

--- linux-2.6.15/drivers/scsi/sd.c      2006-01-12 16:23:44.000000000 +0900
+++ linux-2.6.15_fix/drivers/scsi/sd.c  2006-01-12 16:43:04.000000000 +0900
@@ -503,6 +503,8 @@

        SCSI_LOG_HLQUEUE(3, printk("sd_release: disk=%s\n", disk->disk_name));

+       if (sdkp->WCE)
+               sd_sync_cache(sdev);
        if (!--sdkp->openers && sdev->removable) {
                if (scsi_block_when_processing_errors(sdev))
                        scsi_set_medium_removal(sdev, SCSI_REMOVAL_ALLOW);

-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux