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]
Message-ID: <Y89F0KGdEBcwu39Y@codewreck.org>
Date:   Tue, 24 Jan 2023 11:43:28 +0900
From:   asmadeus@...ewreck.org
To:     Eric Van Hensbergen <evanhensbergen@...oud.com>
Cc:     v9fs-developer@...ts.sourceforge.net, rminnich@...il.com,
        lucho@...kov.net, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux_oss@...debyte.com
Subject: Re: [PATCH v2 03/10] Consolidate file operations and add readahead
 and writeback

Eric Van Hensbergen wrote on Sun, Dec 18, 2022 at 11:22:13PM +0000:
> We had 3 different sets of file operations across 2 different protocol
> variants differentiated by cache which really only changed 3
> functions.  But the real problem is that certain file modes, mount
> options, and other factors weren't being considered when we
> decided whether or not to use caches.
> 
> This consolidates all the operations and switches
> to conditionals within a common set to decide whether or not
> to do different aspects of caching.
> 
> Signed-off-by: Eric Van Hensbergen <evanhensbergen@...oud.com>
> ---
>  fs/9p/v9fs.c           |  30 ++++------
>  fs/9p/v9fs.h           |   2 +
>  fs/9p/v9fs_vfs.h       |   4 --
>  fs/9p/vfs_dir.c        |   9 +++
>  fs/9p/vfs_file.c       | 123 +++++++----------------------------------
>  fs/9p/vfs_inode.c      |  31 ++++-------
>  fs/9p/vfs_inode_dotl.c |  19 ++++++-
>  7 files changed, 71 insertions(+), 147 deletions(-)
> 
> diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
> index 1675a196c2ba..536769cdf7c8 100644
> --- a/fs/9p/vfs_dir.c
> +++ b/fs/9p/vfs_dir.c
> @@ -214,6 +214,15 @@ int v9fs_dir_release(struct inode *inode, struct file *filp)
>  	p9_debug(P9_DEBUG_VFS, "inode: %p filp: %p fid: %d\n",
>  		 inode, filp, fid ? fid->fid : -1);
>  	if (fid) {
> +		if ((fid->qid.type == P9_QTFILE) && (filp->f_mode & FMODE_WRITE)) {

dir release, but the fid is of type regular file ?

Either way this doesn't look directly related to cache level
consodilations, probably better in another commit.

> +			int retval = file_write_and_wait_range(filp, 0, -1);
> +
> +			if (retval != 0) {
> +				p9_debug(P9_DEBUG_ERROR,
> +					"trying to flush filp %p failed with error code %d\n",
> +					filp, retval);
> +			}
> +		}
>  		spin_lock(&inode->i_lock);
>  		hlist_del(&fid->ilist);
>  		spin_unlock(&inode->i_lock);
-- 
Dominique

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ