From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Price Date: Wed, 20 Jun 2012 18:42:51 +0100 Subject: [Cluster-devel] [PATCH] mkfs.gfs2: Follow symlinks before checking device contents In-Reply-To: <5a30bad4-2f62-4ac7-b356-3a2e3a298878@zmail12.collab.prod.int.phx2.redhat.com> References: <5a30bad4-2f62-4ac7-b356-3a2e3a298878@zmail12.collab.prod.int.phx2.redhat.com> Message-ID: <4FE20B9B.90107@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Bob, On 20/06/12 17:15, Bob Peterson wrote: > ----- Original Message ----- > | + absname = canonicalize_file_name(sdp->device_name); > > Hi Andy, > > Thanks for the patch. I just wanted to point out that in the past we've > used realpath rather than canonicalize_file_name. For example, see this patch > we did a long time ago to gfs2_tool: > > http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=e70898cfa09939a7100a057433fff3a4ad666bdd Hmm those uses of realpath seem to have disappeared since. > It would be nice if our use was consistent. I'm not sure if there's an > advantage of one over the other. If canonicalize_file_name is now preferred > upstream over realpath, we should probably replace all occurrences of that. > > On the other hand, if realpath is now preferred upstream, we should adjust > this patch to use it instead. AFAIK, they are the same, and I don't have a > personal preference; whatever is most favoured by the upstream community. :) I couldn't find any strong arguments in preference of either function and we're already using _GNU_SOURCE extensions so there's no added portability issue. In the current state of gfs2-utils.git we're only using realpath twice, in gfs2_quota, so I don't think there's a strong consistency argument either. I'll push this one as-is in the morning unless someone can provide a convincing reason to use realpath :) > Otherwise, the patch looks good. Thanks for the review, Andy