lkml.org 
[lkml]   [2011]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] xfs: use per-filesystem I/O completion workqueues
On Thu, Nov 10, 2011 at 11:42:42AM -0600, Ben Myers 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?

It applies deep magic to make sure a pattern like mine is fine for
the lockdep lock name, but just uses it directly for the workqueue name.

Oddly enough the names seem to display correctly on my test systems
anyway.

Tejun, any chance to change alloc_workqueue to use the string pasting
trick also for the normal workqueue name, or even better add a varargs
version of alloc_workqueue?



\
 
 \ /
  Last update: 2011-11-14 11:37    [W:0.042 / U:28.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site