Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp620327pxy; Fri, 30 Apr 2021 12:30:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQ2j8RZ4hGUVGZJJurXGu0Y2/cmjTkGnlB79cKr24Eki9pqvg9vHE3SlLDuh6/Q/cZDfnO X-Received: by 2002:a17:90a:4588:: with SMTP id v8mr10310212pjg.195.1619811022294; Fri, 30 Apr 2021 12:30:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619811022; cv=none; d=google.com; s=arc-20160816; b=GKvMGxTBKweTXwtLg3Pnj34DOoXARKkImJjJTHM0w9kxYuOeTHWb620kAWyw6Py+Po zFgUO6oMgMnWfD01+0eIC5g7/yrrdNCmJ/c01v+cppgCLsB6gi1EhzsNV7eSLS1qszpr UMfzlC5S2uQhQn71YO/MBbHWscabEcydgyM8xJ64pUEXoH2m6mrtXlDFQ1Fqugc1/K0Q ThEHOrbIZdu0W+93Hr7LrYnOSurvpiLy6Ovf98wVBz6wHqUYgRvF1vtz2aC+CK93kf8+ fMdK2fgncdIYOAoEegygfcJVexV3x0zrit8D1qQ0Wde5ouk9t87HsVPmSTgCCI+E/wFr YN/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:to:from:date:dkim-signature; bh=xsfKWu9djAexRf8YYIEh/TvQ8uWgjaR/8FmkkjYHDMQ=; b=RMD0qZCECYBu4IwlU9IMVDZVzsBOLe5Db3/ZEkdEnIeUmyie7m98jqQ2Lj/sYHMiEq Kc1DzvPfHDCp+qrjd/ocUmKj2wiD8wCzK3EfmiAzorShe1bQ24RHCUZbWQ+ytee/QMKX YJjH7JVVjHReZTJ+uUK+sjSyZw4QphApe4tnm1k7tQAH3nNXQD9iXt2MoE5EtV6ggkhX anom5gpwPACPKjN+siNmKe8pGKFk/SvEIe2VdzITzEnqF6tROojuGlX9TpBgEscbdE1V UqgI+hIBCVA+KdOivYl2qN7ZM5p63M2V/+QY8CWueKwbSh1y/fo0ZujswrSNNZzYO0nb q45g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G7dPItt9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si5171131pgu.92.2021.04.30.12.30.09; Fri, 30 Apr 2021 12:30:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G7dPItt9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231773AbhD3T35 (ORCPT + 99 others); Fri, 30 Apr 2021 15:29:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230356AbhD3T34 (ORCPT ); Fri, 30 Apr 2021 15:29:56 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7A2CC06174A; Fri, 30 Apr 2021 12:29:07 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id l2so19471380wrm.9; Fri, 30 Apr 2021 12:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to; bh=xsfKWu9djAexRf8YYIEh/TvQ8uWgjaR/8FmkkjYHDMQ=; b=G7dPItt9FEhqr9c207tbh+hMSJ00gc44EZ7WniDIsCu+4XmHUjdthA8dOnZ315n+Vc j//+QqSXtoryhIvjCdapYzc1I+XO0SkhgHpAbyQHvdkKjfNfG13vXYtVpvw8IdpaqGhO SeIHzX9KYeogpXfRdm4ludGDoo91u9Sw6vOeTzg3LVCQTw+sn9V+D92mk3vOWAsUGmf3 JCCW2kXWLjPFjTwzG9sju6JQUwWtLSZapS036fmfSuU1U8mabp5LIAeTdV59Ykqg+0gy GFOZ1UtKPIK1pk+Jm78QERu959pDCJl3cGcnbblUO6zZTSC8rwAh+Jbok1CNjk4nhust JBjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to; bh=xsfKWu9djAexRf8YYIEh/TvQ8uWgjaR/8FmkkjYHDMQ=; b=AZbMUmuR58DPOMX9nSBqQgwmQsK1csDyQVaR/41TsxmBqOd4n1CFLRrUJ73P8dTHgp CZqGrh3wrI/kKRttj4eJoE/yWw7kCtxSkEtulgghWzjTNtv6Fg9DIv7lLYma9YA4iZOe xDxt1X7KyFGJxVM1Soa0rXfPsQjvwuuWtxh8fWqRyJqHS1thHhtX+eigJL+mY/sDtvi4 b1fnNTpg0KOx0avHuofhbUnQoWMPQ3M8kXy6bJ4d1J2id6OdQ6TWaKQhQ6+jMwF0c+rt vhTPTikCWvGeO4/iBHM2qsHv7iAYziHDzu9BbILW4qxlrIwMTmVZtu8gQXHwIxxQ2gIC IOWA== X-Gm-Message-State: AOAM532DVD9d8aEkhMrusVbECCQ7egLxJLf9tvI+/cfxY0KSxULDUOjh hW+iz3t+TFTk+3iAvb6Wevhczi5g5yXVJw== X-Received: by 2002:a5d:6085:: with SMTP id w5mr9404523wrt.14.1619810946705; Fri, 30 Apr 2021 12:29:06 -0700 (PDT) Received: from pevik ([62.201.25.198]) by smtp.gmail.com with ESMTPSA id u2sm13813002wmc.22.2021.04.30.12.29.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Apr 2021 12:29:06 -0700 (PDT) Date: Fri, 30 Apr 2021 21:29:03 +0200 From: Petr Vorel To: Heiko Thiery , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Stephen Hemminger Subject: Re: [PATCH iproute2-next v2] lib/fs: fix issue when {name,open}_to_handle_at() is not implemented Message-ID: Reply-To: Petr Vorel References: <20210430062632.21304-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > > +++ b/lib/fs.c > > @@ -30,6 +30,27 @@ > > /* if not already mounted cgroup2 is mounted here for iproute2's use */ > > #define MNT_CGRP2_PATH "/var/run/cgroup2" > > + > > +#ifndef defined HAVE_HANDLE_AT > This is also wrong, it must be: > #ifndef HAVE_HANDLE_AT > > +struct file_handle { > > + unsigned handle_bytes; > > + int handle_type; > > + unsigned char f_handle[]; > > +}; > > + > > +int name_to_handle_at(int dirfd, const char *pathname, > > + struct file_handle *handle, int *mount_id, int flags) > > +{ > > + return syscall(name_to_handle_at, 5, dirfd, pathname, handle, > > + mount_id, flags); > Also I overlooked bogus 5 parameter, why is here? Correct is: > return syscall(__NR_name_to_handle_at, dfd, pathname, handle, > mount_id, flags); Uh, one more typo on my side, sorry (dfd => dirfd): return syscall(__NR_name_to_handle_at, dirfd, pathname, handle, mount_id, flags); Kind regards, Petr > > +} > > + > > +int open_by_handle_at(int mount_fd, struct file_handle *handle, int flags) > > +{ > > + return syscall(open_by_handle_at, 3, mount_fd, handle, flags); > And here 3, correct version is is: > return syscall(__NR_open_by_handle_at, mount_fd, handle, flags); > + adding at the top: > #ifndef HAVE_HANDLE_AT > # include > #endif > Kind regards, > Petr