xfs
[Top] [All Lists]

Re: [REVIEW] cleanup - remove bhv_vname_t

To: "Christoph Hellwig" <hch@xxxxxxxxxxxxx>
Subject: Re: [REVIEW] cleanup - remove bhv_vname_t
From: "Barry Naujok" <bnaujok@xxxxxxx>
Date: Tue, 08 Apr 2008 16:50:26 +1000
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>
In-reply-to: <20080408063822.GA21876@xxxxxxxxxxxxx>
Organization: SGI
References: <op.t89zp3j63jf8g2@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20080408063822.GA21876@xxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Opera Mail/9.24 (Win32)
On Tue, 08 Apr 2008 16:38:22 +1000, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

On Tue, Apr 08, 2008 at 02:50:17PM +1000, Barry Naujok wrote:
-
+

What's this?  both lines look empty.

The first had a tab, my editor automatically cleans whitespace from
the end of lines. Two cases of that in this patch.

        return -dm_send_namesp_event(event, mp ? mp->m_super : NULL,
                                    ip1->i_vnode, vp1_right,
                                    ip2 ? ip2->i_vnode : NULL, vp2_right,
-                                   name1, name2,
+                                   (char *)name1, (char *)name2,

please change dm_send_namesp_event to take a const char aswell.

Noooo :)

+static inline struct xfs_name *
+xfs_dentry_name(
+       struct xfs_name *namep,
+       struct dentry   *dentry)
+{
+       namep->name = dentry->d_name.name;
+       namep->len = dentry->d_name.len;
+       return namep;
+}

As mentioned in my comment to the CI series:  shouldn't you just use
a struct qstr instead of adding a new struct xfs_name?

Keeping a clean line between fs/xfs and fs/xfs/linux-2.6.

Also please don't add inline for this.
+xfs_name_t xfs_name_dotdot = {"..", 2};

const?

I should change all calls using xfs_name to use const xfs_name?

+       args.name = name->name;
+       args.namelen = name->len;
+       args.hashval = xfs_da_hashname(name->name, name->len);

What about just putting a pointer to the xfs_name/qstr into args?

As Dave said, for another cleanup patch :)






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