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] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 13 Apr 2023 07:34:51 -0700
From:   "Darrick J. Wong" <djwong@...nel.org>
To:     "Ritesh Harjani (IBM)" <ritesh.list@...il.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-ext4@...r.kernel.org,
        Jan Kara <jack@...e.cz>, Christoph Hellwig <hch@...radead.org>,
        Ojaswin Mujoo <ojaswin@...ux.ibm.com>,
        Disha Goel <disgoel@...ux.ibm.com>,
        Christoph Hellwig <hch@....de>
Subject: Re: [RFCv3 08/10] iomap: Remove IOMAP_DIO_NOSYNC unused dio flag

On Thu, Apr 13, 2023 at 02:10:30PM +0530, Ritesh Harjani (IBM) wrote:
> IOMAP_DIO_NOSYNC earlier was added for use in btrfs. But it seems for
> aio dsync writes this is not useful anyway. For aio dsync case, we
> we queue the request and return -EIOCBQUEUED. Now, since IOMAP_DIO_NOSYNC
> doesn't let iomap_dio_complete() to call generic_write_sync(),
> hence we may lose the sync write.
> 
> Hence kill this flag as it is not in use by any FS now.
> 
> Tested-by: Disha Goel <disgoel@...ux.ibm.com>
> Reviewed-by: Christoph Hellwig <hch@....de>
> Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@...il.com>

Reviewed-by: Darrick J. Wong <djwong@...nel.org>

--D

> ---
>  fs/iomap/direct-io.c  | 2 +-
>  include/linux/iomap.h | 6 ------
>  2 files changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
> index f771001574d0..36ab1152dbea 100644
> --- a/fs/iomap/direct-io.c
> +++ b/fs/iomap/direct-io.c
> @@ -541,7 +541,7 @@ __iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
>  		}
>  
>  		/* for data sync or sync, we need sync completion processing */
> -		if (iocb_is_dsync(iocb) && !(dio_flags & IOMAP_DIO_NOSYNC)) {
> +		if (iocb_is_dsync(iocb)) {
>  			dio->flags |= IOMAP_DIO_NEED_SYNC;
>  
>  		       /*
> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> index 0f8123504e5e..e2b836c2e119 100644
> --- a/include/linux/iomap.h
> +++ b/include/linux/iomap.h
> @@ -377,12 +377,6 @@ struct iomap_dio_ops {
>   */
>  #define IOMAP_DIO_PARTIAL		(1 << 2)
>  
> -/*
> - * The caller will sync the write if needed; do not sync it within
> - * iomap_dio_rw.  Overrides IOMAP_DIO_FORCE_WAIT.
> - */
> -#define IOMAP_DIO_NOSYNC		(1 << 3)
> -
>  ssize_t iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter,
>  		const struct iomap_ops *ops, const struct iomap_dio_ops *dops,
>  		unsigned int dio_flags, void *private, size_t done_before);
> -- 
> 2.39.2
> 

Powered by blists - more mailing lists