lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHckoCyMvAw8ux2mNdM6Keo+LeHY=1DNVOoEVNKkOi+cFds+CA@mail.gmail.com>
Date:   Fri, 8 Oct 2021 11:23:27 +0800
From:   Li Feng <fengli@...rtx.com>
To:     Song Liu <song@...nel.org>
Cc:     linux-raid <linux-raid@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] md: allow to set the fail_fast on RAID1/RAID10

Done, thanks for responding.

Thanks,
Feng Li

Song Liu <song@...nel.org> 于2021年10月7日周四 下午10:59写道:
>
> On Thu, Oct 7, 2021 at 12:00 AM Li Feng <fengli@...rtx.com> wrote:
> >
> > Continue ping...
> >
> > Thanks,
> > Feng Li
>
> Hmm.. this is weird. I didn't see previous emails in this thread.
> Could you please
> send it again?
>
> Thanks,
> Song
>
> >
> > Li Feng <fengli@...rtx.com> 于2021年9月27日周一 下午9:24写道:
> > >
> > > Hi Song,
> > >
> > > What about this feature?
> > >
> > > Thanks,
> > > Feng Li
> > >
> > > Li Feng <fengli@...rtx.com> 于2021年9月15日周三 下午11:08写道:
> > > >
> > > > ping ...
> > > >
> > > > Thanks,
> > > > Feng Li
> > > >
> > > > Li Feng <fengli@...rtx.com> 于2021年9月13日周一 上午11:22写道:
> > > > >
> > > > > When the running RAID1/RAID10 need to be set with the fail_fast flag,
> > > > > we have to remove each device from RAID and re-add it again with the
> > > > > --fail_fast flag.
> > > > >
> > > > > Export the fail_fast flag to the userspace to support the read and
> > > > > write.
> > > > >
> > > > > Signed-off-by: Li Feng <fengli@...rtx.com>
> > > > > ---
> > > > >  drivers/md/md.c | 30 ++++++++++++++++++++++++++++++
> > > > >  1 file changed, 30 insertions(+)
> > > > >
> > > > > diff --git a/drivers/md/md.c b/drivers/md/md.c
> > > > > index ae8fe54ea358..ce63972a4555 100644
> > > > > --- a/drivers/md/md.c
> > > > > +++ b/drivers/md/md.c
> > > > > @@ -3583,6 +3583,35 @@ ppl_size_store(struct md_rdev *rdev, const char *buf, size_t len)
> > > > >  static struct rdev_sysfs_entry rdev_ppl_size =
> > > > >  __ATTR(ppl_size, S_IRUGO|S_IWUSR, ppl_size_show, ppl_size_store);
> > > > >
> > > > > +static ssize_t
> > > > > +fail_fast_show(struct md_rdev *rdev, char *page)
> > > > > +{
> > > > > +       return sprintf(page, "%d\n", test_bit(FailFast, &rdev->flags));
> > > > > +}
> > > > > +
> > > > > +static ssize_t
> > > > > +fail_fast_store(struct md_rdev *rdev, const char *buf, size_t len)
> > > > > +{
> > > > > +       int ret;
> > > > > +       bool bit;
> > > > > +
> > > > > +       ret = kstrtobool(buf, &bit);
> > > > > +       if (ret)
> > > > > +               return ret;
> > > > > +
> > > > > +       if (test_bit(FailFast, &rdev->flags) && !bit) {
> > > > > +               clear_bit(FailFast, &rdev->flags);
> > > > > +               md_update_sb(rdev->mddev, 1);
> > > > > +       } else if (!test_bit(FailFast, &rdev->flags) && bit) {
> > > > > +               set_bit(FailFast, &rdev->flags);
> > > > > +               md_update_sb(rdev->mddev, 1);
> > > > > +       }
> > > > > +       return len;
> > > > > +}
> > > > > +
> > > > > +static struct rdev_sysfs_entry rdev_fail_fast =
> > > > > +__ATTR(fail_fast, 0644, fail_fast_show, fail_fast_store);
> > > > > +
> > > > >  static struct attribute *rdev_default_attrs[] = {
> > > > >         &rdev_state.attr,
> > > > >         &rdev_errors.attr,
> > > > > @@ -3595,6 +3624,7 @@ static struct attribute *rdev_default_attrs[] = {
> > > > >         &rdev_unack_bad_blocks.attr,
> > > > >         &rdev_ppl_sector.attr,
> > > > >         &rdev_ppl_size.attr,
> > > > > +       &rdev_fail_fast.attr,
> > > > >         NULL,
> > > > >  };
> > > > >  static ssize_t
> > > > > --
> > > > > 2.31.1
> > > > >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ