bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrii Nakryiko <andrii.nakryiko@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@redhat.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	David Miller <davem@davemloft.net>,
	Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH bpf-next v4 3/5] libbpf: Move directory creation into _pin() functions
Date: Thu, 31 Oct 2019 10:27:12 -0700	[thread overview]
Message-ID: <CAEf4BzbKgZ_3MfF6YiN60Mbqrut-U8Ypyc6-=ZZCcwGL+Y74zQ@mail.gmail.com> (raw)
In-Reply-To: <157237796564.169521.10850494774906637330.stgit@toke.dk>

On Tue, Oct 29, 2019 at 12:39 PM Toke Høiland-Jørgensen <toke@redhat.com> wrote:
>
> From: Toke Høiland-Jørgensen <toke@redhat.com>
>
> The existing pin_*() functions all try to create the parent directory
> before pinning. Move this check into the per-object _pin() functions
> instead. This ensures consistent behaviour when auto-pinning is
> added (which doesn't go through the top-level pin_maps() function), at the
> cost of a few more calls to mkdir().
>
> Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
> ---

Makes sense, thanks.

Acked-by: Andrii Nakryiko <andriin@fb.com>

>  tools/lib/bpf/libbpf.c |   61 +++++++++++++++++++++++++++---------------------
>  1 file changed, 34 insertions(+), 27 deletions(-)
>

[...]

  reply	other threads:[~2019-10-31 17:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29 19:39 [PATCH bpf-next v4 0/5] libbpf: Support automatic pinning of maps using 'pinning' BTF attribute Toke Høiland-Jørgensen
2019-10-29 19:39 ` [PATCH bpf-next v4 1/5] libbpf: Fix error handling in bpf_map__reuse_fd() Toke Høiland-Jørgensen
2019-10-29 19:39 ` [PATCH bpf-next v4 2/5] libbpf: Store map pin path and status in struct bpf_map Toke Høiland-Jørgensen
2019-10-31 17:22   ` Andrii Nakryiko
2019-10-31 17:26     ` Toke Høiland-Jørgensen
2019-10-31 17:28       ` Andrii Nakryiko
2019-10-31 17:31     ` Toke Høiland-Jørgensen
2019-10-31 17:43       ` Andrii Nakryiko
2019-10-29 19:39 ` [PATCH bpf-next v4 3/5] libbpf: Move directory creation into _pin() functions Toke Høiland-Jørgensen
2019-10-31 17:27   ` Andrii Nakryiko [this message]
2019-10-29 19:39 ` [PATCH bpf-next v4 4/5] libbpf: Add auto-pinning of maps when loading BPF objects Toke Høiland-Jørgensen
2019-10-31 17:37   ` Andrii Nakryiko
2019-10-31 17:52     ` Andrii Nakryiko
2019-10-31 18:06       ` Toke Høiland-Jørgensen
2019-10-29 19:39 ` [PATCH bpf-next v4 5/5] selftests: Add tests for automatic map pinning Toke Høiland-Jørgensen
2019-10-31 18:02   ` Andrii Nakryiko
2019-10-31 18:18     ` Toke Høiland-Jørgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAEf4BzbKgZ_3MfF6YiN60Mbqrut-U8Ypyc6-=ZZCcwGL+Y74zQ@mail.gmail.com' \
    --to=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=toke@redhat.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).