public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>,
	Chris Mason <chris.mason@fusionio.com>,
	Steve French <sfrench@samba.org>, Mark Fasheh <mfasheh@suse.com>,
	Joel Becker <jlbec@evilplan.org>, Matthew Wilcox <matthew@wil.cx>,
	linux-afs@lists.infradead.org, linux-fsdevel@vger.kernel.org,
	linux-btrfs@vger.kernel.org, linux-cifs@vger.kernel.org,
	samba-technical@lists.samba.org, ocfs2-devel@oss.oracle.com
Subject: Re: [patch 05/10] vfs: pass data to alloc_inode super operation
Date: Tue, 30 Oct 2012 20:51:42 +0000	[thread overview]
Message-ID: <20121030205142.GB2616@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1351628084-29358-8-git-send-email-jmoyer@redhat.com>

On Tue, Oct 30, 2012 at 04:14:39PM -0400, Jeff Moyer wrote:
> This patch passes a data pointer along to the alloc_inode
> super_operations function.  The value will initially be used by
> bdev_alloc_inode to allocate the bdev_inode on the same numa
> node as the device to which it is tied.

Yecchhh...

> -static struct inode *bdev_alloc_inode(struct super_block *sb)
> +static struct inode *bdev_alloc_inode(struct super_block *sb, void *data)
>  {
> -	struct bdev_inode *ei = kmem_cache_alloc(bdev_cachep, GFP_KERNEL);
> +	struct bdev_inode *ei;
> +	int partno;
> +	int node;
> +
> +	if (data) {
> +		struct gendisk *disk;
> +		dev_t dev = *(dev_t *)data;
> +		disk = get_gendisk(dev, &partno);
> +		node = disk->node_id;
> +		put_disk(disk);

Oh, _lovely_.  Such a stunningly elegant idea.  And why not pass the
sodding node_id directly, if I may ask?

[reads further]
[finds completely undocumented reason for that]

Take that crap out and don't bring it back.  And consider this kludge NAKed
once and forever.  It's unspeakably ugly, even if it didn't break just about
every fs out there (you do realize that almost all of them have ->alloc_inode(),
don't you?  Use grep and see).

  reply	other threads:[~2012-10-30 20:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30 20:14 [patch 00/10] make I/O path allocations more numa-friendly Jeff Moyer
2012-10-30 20:14 ` [patch 00/10] *** SUBJECT HERE *** Jeff Moyer
2012-10-30 20:14 ` [patch 00/10] make I/O path allocations more numa-friendly Jeff Moyer
2012-10-30 20:14 ` [patch 01/10] scsi: make __scsi_alloc_queue numa-aware Jeff Moyer
2012-11-02 11:31   ` Bart Van Assche
2012-11-02 14:19     ` Jeff Moyer
2012-10-30 20:14 ` [patch 02/10] scsi: make scsi_alloc_sdev numa-aware Jeff Moyer
2012-10-30 20:14 ` [patch 03/10] scsi: allocate scsi_cmnd-s from the device's local numa node Jeff Moyer
2012-10-30 20:14 ` [patch 04/10] sd: use alloc_disk_node Jeff Moyer
2012-10-30 20:14 ` [patch 05/10] vfs: pass data to alloc_inode super operation Jeff Moyer
2012-10-30 20:51   ` Al Viro [this message]
2012-10-30 21:17     ` Al Viro
2012-10-31 13:22       ` Jeff Moyer
2012-10-30 20:14 ` [patch 06/10] ata: use scsi_host_alloc_node Jeff Moyer
2012-10-30 20:14 ` [patch 07/10] megaraid_sas: " Jeff Moyer
2012-10-30 20:14 ` [patch 08/10] mpt2sas: " Jeff Moyer
2012-10-30 20:14 ` [patch 09/10] lpfc: " Jeff Moyer
2012-10-31 18:56   ` James Smart
2012-10-30 20:14 ` [patch 10/10] cciss: use blk_init_queue_node Jeff Moyer

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=20121030205142.GB2616@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=chris.mason@fusionio.com \
    --cc=dhowells@redhat.com \
    --cc=jlbec@evilplan.org \
    --cc=jmoyer@redhat.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=mfasheh@suse.com \
    --cc=ocfs2-devel@oss.oracle.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.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