linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Clements <kernel@steeleye.com>
To: linux-kernel@vger.kernel.org, akpm@digeo.com,
	Pavel Machek <pavel@suse.cz>
Cc: ldl@aros.net
Subject: Re: [PATCH 2.5.73] nbd: maintain compatibility with existing nbd tools
Date: Sun, 29 Jun 2003 17:04:55 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.10.10306291624250.764-200000@clements.sc.steeleye.com> (raw)
In-Reply-To: <20030629184253.GE267@elf.ucw.cz>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1229 bytes --]

On Sun, 29 Jun 2003, Pavel Machek wrote:

> > > [ ... ] In the meantime, the nbd-client tool currently can't correctly set 
> > > the size of the device and either that needs to be worked around in the 
> > > driver (I'd done that in the original jumbo patch), or the nbd-client 
> > > tool needs to be updated (the patch I'd mailed out for nbd-client works 
> > > around the sizing issue by re-opening the nbd). To be clear, that's not 
> > > something any of the changes that have gone in so far broke nor address. 
> > > It's a consequence of how bd_set_size() is called in fs/block_dev.c 
> > > do_open().
> > 
> > And here's the (tiny) patch for nbd to maintain compatibility with the
> > existing nbd-client tool. Compiled and tested on a couple machines.
> > Please apply.
> 
> You are the maintainer, you can go to the linus directly. (I hope
> Linus took that MAINTAINERS patch).

Not yet, I don't think...

> [Aha, if you wanted *Andrew* to apply it... I guess it is better to
> say directly who do you want to take it.]

Well, it's just that Andrew seems particularly willing to help on this,
so that's why I sent to him...

At any rate, Andrew, here's a cleaned up version of the patch... please apply.

Thanks,
Paul

[-- Attachment #2: Type: TEXT/PLAIN, Size: 825 bytes --]

--- linux-2.5/drivers/block/nbd.c.PRISTINE	Sat Jun 28 12:57:03 2003
+++ linux-2.5/drivers/block/nbd.c	Sat Jun 28 12:57:54 2003
@@ -503,15 +503,18 @@
 			lo->blksize_bits++;
 			temp >>= 1;
 		}
-		lo->bytesize &= ~(lo->blksize-1); 
+		lo->bytesize &= ~(lo->blksize-1);
+		inode->i_bdev->bd_inode->i_size = lo->bytesize;
 		set_capacity(lo->disk, lo->bytesize >> 9);
 		return 0;
 	case NBD_SET_SIZE:
-		lo->bytesize = arg & ~(lo->blksize-1); 
+		lo->bytesize = arg & ~(lo->blksize-1);
+		inode->i_bdev->bd_inode->i_size = lo->bytesize;
 		set_capacity(lo->disk, lo->bytesize >> 9);
 		return 0;
 	case NBD_SET_SIZE_BLOCKS:
 		lo->bytesize = ((u64) arg) << lo->blksize_bits;
+		inode->i_bdev->bd_inode->i_size = lo->bytesize;
 		set_capacity(lo->disk, lo->bytesize >> 9);
 		return 0;
 	case NBD_DO_IT:

      reply	other threads:[~2003-06-29 20:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-25  6:51 [RFC][PATCH] nbd driver for 2.5+: fix locking issues with ioctl UI Lou Langholtz
2003-06-25  7:19 ` Andrew Morton
2003-06-25 14:24   ` Lou Langholtz
2003-06-25 15:36   ` Lou Langholtz
2003-06-25 15:55     ` Christoph Hellwig
2003-06-25 17:38       ` Lou Langholtz
2003-06-25 17:44         ` Christoph Hellwig
2003-06-25 18:16           ` Lou Langholtz
2003-06-25 18:19             ` Christoph Hellwig
2003-06-25 17:58     ` Anyone for NBD maintainer [was Re: [RFC][PATCH] nbd driver for 2.5+: fix locking issues with ioctl UI] Pavel Machek
2003-06-25 18:21       ` Lou Langholtz
2003-06-25 18:30         ` Pavel Machek
2003-06-25 21:35           ` Lou Langholtz
     [not found]       ` <Pine.LNX.4.10.10306251645580.11076-100000@clements.sc.steeleye.com>
2003-06-25 21:09         ` NBD maintainer change [was Re: Anyone for NBD maintainer] Pavel Machek
2003-06-25 17:48 ` [RFC][PATCH] nbd driver for 2.5+: fix locking issues with ioctl UI Paul Clements
2003-06-25 17:56   ` viro
2003-06-25 18:57   ` Lou Langholtz
2003-06-25 19:41     ` Lou Langholtz
2003-06-25 20:00     ` Paul Clements
2003-06-25 22:17       ` Lou Langholtz
2003-06-28 17:13         ` Paul Clements
2003-06-30 16:10           ` Lou Langholtz
2003-06-28 17:20         ` [PATCH] nbd: maintain compatibility with existing nbd tools Paul Clements
2003-06-29 18:42           ` Pavel Machek
2003-06-29 21:04             ` Paul Clements [this message]

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=Pine.LNX.4.10.10306291624250.764-200000@clements.sc.steeleye.com \
    --to=kernel@steeleye.com \
    --cc=Paul.Clements@steeleye.com \
    --cc=akpm@digeo.com \
    --cc=ldl@aros.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    /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;
as well as URLs for NNTP newsgroup(s).