From: "Andrey Borzenkov" <arvidjaar@mail.ru>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.4.20 fix file_readahead for ide-cd and ide-floppy
Date: Sun, 12 Jan 2003 13:14:13 +0300 [thread overview]
Message-ID: <E18Xf89-000Iej-00@f8.mail.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 516 bytes --]
The file_readahead setting in ide-cd and ide-floppy obviously
assumed read-ahead values are kept as bytes. This made them
totally useless. This patch unifies file_readahead with ide-disk
making values be stored correctly as pages and displayed as KB.
This also changes breada setting to match ide-disk as well (is it
really used at all? It appears the only place where it is referenced
is reiserfs).
The patch is agains Mandrake sources but as I assume it should apply to vanilla kernel as well.
cheers
-andrey
[-- Attachment #2: 2.4.20-2mdk.file_readahead-ide-cd-ide-floppy.patch --]
[-- Type: application/octet-stream, Size: 2468 bytes --]
--- /usr/src/linux-2.4.20-2mdk/drivers/ide/ide-cd.c 2002-12-09 14:38:17.000000000 +0300
+++ drivers/ide/ide-cd.c 2003-01-11 22:25:06.000000000 +0300
@@ -2717,8 +2717,8 @@
int major = HWIF(drive)->major;
int minor = drive->select.b.unit << PARTN_BITS;
- ide_add_setting(drive, "breada_readahead", SETTING_RW, BLKRAGET, BLKRASET, TYPE_INT, 0, 255, 1, 2, &read_ahead[major], NULL);
- ide_add_setting(drive, "file_readahead", SETTING_RW, BLKFRAGET, BLKFRASET, TYPE_INTA, 0, INT_MAX, 1, 1024, &max_readahead[major][minor], NULL);
+ ide_add_setting(drive, "breada_readahead", SETTING_RW, BLKRAGET, BLKRASET, TYPE_INT, 0, 255, 1, 1, &read_ahead[major], NULL);
+ ide_add_setting(drive, "file_readahead", SETTING_RW, BLKFRAGET, BLKFRASET, TYPE_INTA, 0, 4096, PAGE_SIZE, 1024, &max_readahead[major][minor], NULL);
ide_add_setting(drive, "max_kb_per_request", SETTING_RW, BLKSECTGET, BLKSECTSET, TYPE_INTA, 1, 255, 1, 2, &max_sectors[major][minor], NULL);
ide_add_setting(drive, "dsc_overlap", SETTING_RW, -1, -1, TYPE_BYTE, 0, 1, 1, 1, &drive->dsc_overlap, NULL);
}
--- /usr/src/linux-2.4.20-2mdk/drivers/ide/ide-floppy.c 2002-12-09 14:38:17.000000000 +0300
+++ drivers/ide/ide-floppy.c 2003-01-12 12:28:01.000000000 +0300
@@ -2007,8 +2007,8 @@
ide_add_setting(drive, "bios_cyl", SETTING_RW, -1, -1, TYPE_INT, 0, 1023, 1, 1, &drive->bios_cyl, NULL);
ide_add_setting(drive, "bios_head", SETTING_RW, -1, -1, TYPE_BYTE, 0, 255, 1, 1, &drive->bios_head, NULL);
ide_add_setting(drive, "bios_sect", SETTING_RW, -1, -1, TYPE_BYTE, 0, 63, 1, 1, &drive->bios_sect, NULL);
- ide_add_setting(drive, "breada_readahead", SETTING_RW, BLKRAGET, BLKRASET, TYPE_INT, 0, 255, 1, 2, &read_ahead[major], NULL);
- ide_add_setting(drive, "file_readahead", SETTING_RW, BLKFRAGET, BLKFRASET, TYPE_INTA, 0, INT_MAX, 1, 1024, &max_readahead[major][minor], NULL);
+ ide_add_setting(drive, "breada_readahead", SETTING_RW, BLKRAGET, BLKRASET, TYPE_INT, 0, 255, 1, 1, &read_ahead[major], NULL);
+ ide_add_setting(drive, "file_readahead", SETTING_RW, BLKFRAGET, BLKFRASET, TYPE_INTA, 0, 4096, PAGE_SIZE, 1024, &max_readahead[major][minor], NULL);
ide_add_setting(drive, "max_kb_per_request", SETTING_RW, BLKSECTGET, BLKSECTSET, TYPE_INTA, 1, 255, 1, 2, &max_sectors[major][minor], NULL);
ide_add_setting(drive, "ticks", SETTING_RW, -1, -1, TYPE_BYTE, 0, 255, 1, 1, &floppy->ticks, NULL);
reply other threads:[~2003-01-12 10:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E18Xf89-000Iej-00@f8.mail.ru \
--to=arvidjaar@mail.ru \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®