[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080212152124.GA21878@lazybastard.org>
Date: Tue, 12 Feb 2008 16:21:24 +0100
From: Jörn Engel <joern@...fs.org>
To: Stephane Chazelas <stephane.chazelas@...rson.com>
Cc: linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org
Subject: Re: [PATCH 2.6.24] block2mtd: removing a device and typo fixes
On Tue, 12 February 2008 13:47:51 +0000, Stephane Chazelas wrote:
>
> this patch addresses a number of small issues mainly regarding
> the output made by this driver to dmesg:
> - Some of the "blkmtd"'s had not been changed to "block2mtd"
> which caused display problem
> - the parse_err() macro was displaying "block2mtd: " twice
Fairly obvious fixes.
> Also, one can add a block2mtd mtd device with things like:
>
> echo /dev/loop3,$((256*1024)) |
> sudo tee /sys/module/block2mtd/parameters/block2mtd
>
> but individual mtds cannot be removed. You can only do a
> modprobe -r block2mtd to remove *all* the block2mtd mtds.
>
> This patch proposes to add the cabability with:
>
> echo /dev/loop3,remove |
> sudo tee /sys/module/block2mtd/parameters/block2mtd
Sounds sane enough. But I do have some reservations about the
implementation. It would be best if you split the patch in two. One
with the obvious stuff above and one for this.
The core of remove_device_by_name() is shared with block2mtd_exit(),
so a common helper would be good. Your error handling is better, so
let's keep that version.
And independently of your patch a mutex protecting the device list from
simultaneous modifications would be good to have.
Side note: I may not have internet access until 19th or so.
Jörn
--
Rules of Optimization:
Rule 1: Don't do it.
Rule 2 (for experts only): Don't do it yet.
-- M.A. Jackson
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists