Re: [RFC PATCH 1/7] write-or-die.c: remove unused fsync_component() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 22, 2022 at 8:48 PM Ævar Arnfjörð Bjarmason
<avarab@xxxxxxxxx> wrote:
>
> This function added in 020406eaa52 (core.fsync: introduce granular
> fsync control infrastructure, 2022-03-10) hasn't been used, and
> appears not to be used by the follow-up series either?
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
> ---
>  cache.h        | 1 -
>  write-or-die.c | 7 -------
>  2 files changed, 8 deletions(-)
>
> diff --git a/cache.h b/cache.h
> index 84fafe2ed71..5d863f8c5e8 100644
> --- a/cache.h
> +++ b/cache.h
> @@ -1766,7 +1766,6 @@ int copy_file_with_time(const char *dst, const char *src, int mode);
>
>  void write_or_die(int fd, const void *buf, size_t count);
>  void fsync_or_die(int fd, const char *);
> -int fsync_component(enum fsync_component component, int fd);
>  void fsync_component_or_die(enum fsync_component component, int fd, const char *msg);
>
>  static inline int batch_fsync_enabled(enum fsync_component component)
> diff --git a/write-or-die.c b/write-or-die.c
> index c4fd91b5b43..103698450c3 100644
> --- a/write-or-die.c
> +++ b/write-or-die.c
> @@ -76,13 +76,6 @@ void fsync_or_die(int fd, const char *msg)
>                 die_errno("fsync error on '%s'", msg);
>  }
>
> -int fsync_component(enum fsync_component component, int fd)
> -{
> -       if (fsync_components & component)
> -               return maybe_fsync(fd);
> -       return 0;
> -}
> -
>  void fsync_component_or_die(enum fsync_component component, int fd, const char *msg)
>  {
>         if (fsync_components & component)
> --
> 2.35.1.1428.g1c1a0152d61
>

This helper was put in for Patrick's patch at
https://lore.kernel.org/git/f1e8a7bb3bf0f4c0414819cb1d5579dc08fd2a4f.1646905589.git.ps@xxxxxx/.

Thanks,
Neeraj




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux