Master One
wrote:
> Martin Milata writes:
>
>> On Sat, Feb 17, 2007 at 09:17:04PM +0000, Master One wrote:
>> > Is there a newer patch, that works with kernel 2.6.20?
>>
>> I found this one somewhere on the net, works for me. [attached]
>>
>> diff -urN linux-2.6.20-rc6.orig/block/ll_rw_blk.c
> linux-2.6.20-rc6/block/ll_rw_blk.c
>> --- linux-2.6.20-rc6.orig/block/ll_rw_blk.c 2007-01-25
03:19:28.000000000
> +0100
>> +++ linux-2.6.20-rc6/block/ll_rw_blk.c 2007-01-30 16:06:45.000000000
> +0100
>
> No, that patch results in exactly the same compile-error as mentioned
before:
Unfortunately, I'm currently to busy to maintain the old patch. For
those of you who are interested, I'm attaching an intermediary version
of a patch which is eventually due for submission upstream. There are
several issues to be discussed with kernel developers before I can
finish the patch. Still, it should work for the time being.
MIND YOU: There are some important caveats:
There is a change in the interface to previous versions.
/sys/block/[hs]da/queue/protect exists as before, so, hdapsd can be
used without further changes.
HOWEVER, if you previously specified the protect_method option either
on the kernel command line or as an option to the libata or idedisk
module, you HAVE TO remove it before reboot. There is a new attribute
/sys/block/[hs]da/queue/protect_method and you have to do
# echo -n unload > /sys/block/sda/queue/protect_method
if you are using libata.
Be aware that this interface is subject to yet another change in
future releases. I'm going to make this an ioctl in the course of
preparation for upstream submission.
Enjoy!
Elias
--------
Documentation/block/disk-protection.txt | 79 +++++++++++
block/ll_rw_blk.c | 224
+++++++++++++++++++++++++++++++
drivers/ata/libata-scsi.c | 31 ++++
drivers/ide/ide-disk.c | 142 ++++++++++++++++++++
drivers/ide/ide-io.c | 14 ++
drivers/scsi/scsi_lib.c | 163 +++++++++++++++++++++++
include/linux/ata.h | 1
include/linux/blkdev.h | 14 ++
include/linux/ide.h | 1
9 files changed, 669 insertions(+), 0 deletions(-)
create mode 100644 Documentation/block/disk-protection.txt
---