From: Eric Sandeen <sandeen@sgi.com>
To: linux-kernel@vger.kernel.org
Cc: torvalds@transmeta.com, marcelo@conectiva.com.br
Subject: [PATCH] BLKGETSIZE64 broken in 2.4.18-pre1, 2.5.2-pre7
Date: 04 Jan 2002 11:40:30 -0600 [thread overview]
Message-ID: <1010166030.2576.0.camel@stout.americas.sgi.com> (raw)
BLKGETSIZE64 is supposed to return device size in bytes:
#define BLKGETSIZE64 _IOR(0x12,114,sizeof(u64)) /* return device size in
bytes (u64 *arg) */
but in drivers/block/blkpg.c, it's just returning device size/512 as a
u64 number.
This patch should apply to both kernels.
--- linux/drivers/block/blkpg.c.orig Fri Jan 4 11:30:37 2002
+++ linux/drivers/block/blkpg.c Fri Jan 4 11:31:15 2002
@@ -247,7 +247,7 @@
if (cmd == BLKGETSIZE)
return put_user((unsigned long)ullval, (unsigned long *)arg);
else
- return put_user(ullval, (u64 *)arg);
+ return put_user(ullval << 9, (u64 *)arg);
#if 0
case BLKRRPART: /* Re-read partition tables */
if (!capable(CAP_SYS_ADMIN))
--
Eric Sandeen XFS for Linux http://oss.sgi.com/projects/xfs
sandeen@sgi.com SGI, Inc.
reply other threads:[~2002-01-04 17:40 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=1010166030.2576.0.camel@stout.americas.sgi.com \
--to=sandeen@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=torvalds@transmeta.com \
/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®