Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751820AbbEGIfk (ORCPT ); Thu, 7 May 2015 04:35:40 -0400 Received: from mail-wg0-f54.google.com ([74.125.82.54]:33187 "EHLO mail-wg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750900AbbEGIfg (ORCPT ); Thu, 7 May 2015 04:35:36 -0400 Message-ID: <554B23D5.8010509@plexistor.com> Date: Thu, 07 May 2015 11:35:33 +0300 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Christoph Hellwig , Ross Zwisler CC: linux-nvdimm@ml01.01.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, x86@kernel.org, axboe@kernel.dk Subject: Re: [PATCH 1/3] pmem: Initial version of persistent memory driver References: <1427299449-26722-1-git-send-email-hch@lst.de> <1427299449-26722-2-git-send-email-hch@lst.de> <1427314913.14654.1.camel@theros.lm.intel.com> <20150326080656.GE26540@lst.de> <1430757781.5434.6.camel@theros.lm.intel.com> <20150507072602.GA23239@lst.de> In-Reply-To: <20150507072602.GA23239@lst.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1674 Lines: 44 On 05/07/2015 10:26 AM, Christoph Hellwig wrote: > On Mon, May 04, 2015 at 10:43:01AM -0600, Ross Zwisler wrote: >>> Yes, if CONFIG_DEBUG_BLOCK_EXT_DEVT isn't set that code doesn't work at all. >> >> I can't figure out a use case that breaks when using dynamically allocated >> minors without CONFIG_DEBUG_BLOCK_EXT_DEVT. The patch that I've been testing >> against is at the bottom of this mail. >> >> Here are the minors that I get when creating a bunch of partitions using the >> current code with PMEM_MINORS=16, with CONFIG_DEBUG_BLOCK_EXT_DEVT turned off: > > FYI, your patch below works fine for me, but the original one certainly > didn't. One big difference was that it also removed the register_blkdev > call and thus assigning a major number. > assigning a major number for what? That "assigned major number" is then never used *anywhere* in the code at all until it is unregistered. All the devices come up with the dynamic (259) major the register_blkdev is just dead code. I have experimented with this a lot, I have audited the all code stack, that major is never used, when doing the: alloc_disk(0) disk->flags |= GENHD_FL_EXT_DEVT The: disk->major = X Is completely ignored and is immediately over written. The only relic of that major registration is the pmem_major global member collecting dust. Sigh, bad habits die hard, I don't really care you can keep it. Sorry for the noise. Cheers Boaz -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/