xfs
[Top] [All Lists]

Re: [PATCH 2/5] xfs: use per-filesystem I/O completion workqueues

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 2/5] xfs: use per-filesystem I/O completion workqueues
From: Ben Myers <bpm@xxxxxxx>
Date: Thu, 10 Nov 2011 11:42:42 -0600
Cc: Dave Chinner <david@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20111109075847.GA20604@xxxxxxxxxxxxx>
References: <20111108085614.478431403@xxxxxxxxxxxxxxxxxxxxxx> <20111108085846.291838677@xxxxxxxxxxxxxxxxxxxxxx> <20111108231118.GP5534@dastard> <20111109075847.GA20604@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
Hey Christoph,

On Wed, Nov 09, 2011 at 02:58:47AM -0500, Christoph Hellwig wrote:
> +STATIC int
> +xfs_init_mount_workqueues(
> +     struct xfs_mount        *mp)
> +{
> +#define XFS_WQ_NAME_LEN              512
> +     char                    name[XFS_WQ_NAME_LEN];
> +
> +     snprintf(name, XFS_WQ_NAME_LEN, "xfs-data/%s", mp->m_fsname);
> +     mp->m_data_workqueue = alloc_workqueue(name, WQ_MEM_RECLAIM, 1);
> +     if (!mp->m_data_workqueue)
> +             goto out;

Looks to me like alloc_workqueue holds on to that name pointer in
wq->name... won't overwriting the name below be a problem?

> +     snprintf(name, XFS_WQ_NAME_LEN, "xfs-conv/%s", mp->m_fsname);
> +     mp->m_unwritten_workqueue = alloc_workqueue(name, WQ_MEM_RECLAIM, 1);
> +     if (!mp->m_unwritten_workqueue)
> +             goto out_destroy_data_iodone_queue;

-Ben

<Prev in Thread] Current Thread [Next in Thread>