Linux-f2fs-devel Archive mirror
 help / color / mirror / Atom feed
From: Daeho Jeong <daeho43@gmail.com>
To: Chao Yu <chao@kernel.org>
Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs_io: support unset subcommand for pinfile
Date: Wed, 10 Apr 2024 10:55:57 -0700	[thread overview]
Message-ID: <CACOAw_ySNneAHCNAaoQccz0eoVKJnKf6WJBiF6QuV8Gx_1G+iQ@mail.gmail.com> (raw)
In-Reply-To: <9280018c-c023-4254-9936-d79d3dfe84ff@kernel.org>

On Tue, Apr 9, 2024 at 8:27 PM Chao Yu <chao@kernel.org> wrote:
>
> Ping,
>
> Missed to check this patch?
>
> On 2024/3/29 18:25, Chao Yu wrote:
> > This patch adds unset subcommand for pinfile command.
> >
> > Usage: f2fs_io pinfile unset [target_file]
> >
> > Signed-off-by: Chao Yu <chao@kernel.org>
> > ---
> >   man/f2fs_io.8           |  2 +-
> >   tools/f2fs_io/f2fs_io.c | 11 +++++++++--
> >   2 files changed, 10 insertions(+), 3 deletions(-)
> >
> > diff --git a/man/f2fs_io.8 b/man/f2fs_io.8
> > index f097bde..b9c9dc8 100644
> > --- a/man/f2fs_io.8
> > +++ b/man/f2fs_io.8
> > @@ -44,7 +44,7 @@ going down with metadata flush
> >   going down with fsck mark
> >   .RE
> >   .TP
> > -\fBpinfile\fR \fI[get|set] [file]\fR
> > +\fBpinfile\fR \fI[get|set|unset] [file]\fR
> >   Get or set the pinning status on a file.
> >   .TP
> >   \fBfadvise\fR \fI[advice] [offset] [length] [file]\fR
> > diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
> > index b8e4f02..a7b593a 100644
> > --- a/tools/f2fs_io/f2fs_io.c
> > +++ b/tools/f2fs_io/f2fs_io.c
> > @@ -442,7 +442,7 @@ static void do_fadvise(int argc, char **argv, const struct cmd_desc *cmd)
> >
> >   #define pinfile_desc "pin file control"
> >   #define pinfile_help                                                \
> > -"f2fs_io pinfile [get|set] [file]\n\n"                       \
> > +"f2fs_io pinfile [get|set|unset] [file]\n\n"                 \
> >   "get/set pinning given the file\n"                          \
> >
> >   static void do_pinfile(int argc, char **argv, const struct cmd_desc *cmd)
> > @@ -464,7 +464,14 @@ static void do_pinfile(int argc, char **argv, const struct cmd_desc *cmd)
> >               ret = ioctl(fd, F2FS_IOC_SET_PIN_FILE, &pin);
> >               if (ret != 0)
> >                       die_errno("F2FS_IOC_SET_PIN_FILE failed");
> > -             printf("set_pin_file: %u blocks moved in %s\n", ret, argv[2]);
> > +             printf("%s pinfile: %u blocks moved in %s\n",
> > +                                     argv[1], ret, argv[2]);
> > +     } else if (!strcmp(argv[1], "unset")) {
> > +             pin = 0;
> > +             ret = ioctl(fd, F2FS_IOC_SET_PIN_FILE, &pin);
> > +             if (ret != 0)
> > +                     die_errno("F2FS_IOC_SET_PIN_FILE failed");
> > +             printf("%s pinfile in %s\n", argv[1], argv[2]);
> >       } else if (!strcmp(argv[1], "get")) {
> >               unsigned int flags;
> >
>

Reviewed-by: Daeho Jeong <daehojeong@google.com>

Thanks,

>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

      reply	other threads:[~2024-04-10 17:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-29 10:25 [f2fs-dev] [PATCH] f2fs_io: support unset subcommand for pinfile Chao Yu
2024-04-10  3:24 ` Chao Yu
2024-04-10 17:55   ` Daeho Jeong [this message]

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=CACOAw_ySNneAHCNAaoQccz0eoVKJnKf6WJBiF6QuV8Gx_1G+iQ@mail.gmail.com \
    --to=daeho43@gmail.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).