From: Paul Clements <Paul.Clements@SteelEye.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] nbd: fix set_capacity call
Date: Thu, 19 Feb 2004 13:17:49 -0500 [thread overview]
Message-ID: <4034FDCD.B4DEEC5C@SteelEye.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 130 bytes --]
This patch fixes the initial set_capacity call so that it matches nbd's
internal device size (nbd_device->bytesize).
Thanks,
Paul
[-- Attachment #2: nbd_set_capacity_fix.diff --]
[-- Type: text/x-patch, Size: 800 bytes --]
--- 2_6_3_rc2/drivers/block/nbd.c.PROC_PARTITIONS_FIXES Thu Feb 19 11:49:15 2004
+++ 2_6_3_rc2/drivers/block/nbd.c Thu Feb 19 12:00:55 2004
@@ -737,7 +737,7 @@ static int __init nbd_init(void)
INIT_LIST_HEAD(&nbd_dev[i].queue_head);
init_MUTEX(&nbd_dev[i].tx_lock);
nbd_dev[i].blksize = 1024;
- nbd_dev[i].bytesize = ((u64)0x7ffffc00) << 10; /* 2TB */
+ nbd_dev[i].bytesize = 0x7ffffc00ULL << 10; /* 2TB */
disk->major = NBD_MAJOR;
disk->first_minor = i;
disk->fops = &nbd_fops;
@@ -745,7 +745,7 @@ static int __init nbd_init(void)
disk->flags |= GENHD_FL_SUPPRESS_PARTITION_INFO;
sprintf(disk->disk_name, "nbd%d", i);
sprintf(disk->devfs_name, "nbd/%d", i);
- set_capacity(disk, 0x3ffffe);
+ set_capacity(disk, 0x7ffffc00ULL << 1); /* 2 TB */
add_disk(disk);
}
reply other threads:[~2004-02-19 18:17 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=4034FDCD.B4DEEC5C@SteelEye.com \
--to=paul.clements@steeleye.com \
--cc=akpm@osdl.org \
--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