linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christoph Hellwig <hch@lst.de>
Cc: tao.peng@primarydata.com, jeff.layton@primarydata.com,
	bfields@fieldses.org, linux-fsdevel@vger.kernel.org,
	linux-btrfs@vger.kernel.org, linux-nfs@vger.kernel.org,
	linux-cifs@vger.kernel.org
Subject: Re: [PATCH 1/4] locks: new locks_mandatory_area calling convention
Date: Tue, 8 Dec 2015 04:05:04 +0000	[thread overview]
Message-ID: <20151208040504.GA2791@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1449143992-7415-2-git-send-email-hch@lst.de>

On Thu, Dec 03, 2015 at 12:59:49PM +0100, Christoph Hellwig wrote:
> Pass a loff_t end for the last byte instead of the 32-bit count
> parameter to allow full file clones even on 32-bit architectures.
> While we're at it also drop the pointless inode argument and simplify
> the read/write selection.

locks_mandatory_area() contains this:
        if (filp && !(filp->f_flags & O_NONBLOCK))
                sleep = true;
which is a strong hint that filp might be NULL.  And indeed it might -
        error = locks_verify_truncate(inode, NULL, length);
in vfs_truncate() and
        host_err = locks_verify_truncate(inode, NULL, iap->ia_size);
in nfsd_get_write_access().  Both are broken by that commit.

Where the hell would truncate(2) get struct file, anyway?  IOW, the inode
argument is _not_ pointless; re-added.

  reply	other threads:[~2015-12-08  4:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 11:59 move btrfs clone ioctls to common code V2 Christoph Hellwig
2015-12-03 11:59 ` [PATCH 1/4] locks: new locks_mandatory_area calling convention Christoph Hellwig
2015-12-08  4:05   ` Al Viro [this message]
2015-12-08 14:54     ` Christoph Hellwig
2015-12-08 16:16       ` Al Viro
2015-12-03 11:59 ` [PATCH 2/4] vfs: pull btrfs clone API to vfs layer Christoph Hellwig
2015-12-07  0:53   ` Darrick J. Wong
2015-12-07 15:13     ` Christoph Hellwig
2015-12-07 21:09       ` Darrick J. Wong
2015-12-08  1:54       ` Darrick J. Wong
2015-12-14 16:34     ` [PATCH 5/4] vfs: return EINVAL for unsupported file types in clone Christoph Hellwig
2015-12-09 20:40   ` [PATCH 2/4] vfs: pull btrfs clone API to vfs layer Darrick J. Wong
2015-12-14 16:34     ` Christoph Hellwig
2015-12-14 17:08     ` Darrick J. Wong
2015-12-03 11:59 ` [PATCH 3/4] nfsd: Pass filehandle to nfs4_preprocess_stateid_op() Christoph Hellwig
2015-12-03 11:59 ` [PATCH 4/4] nfsd: implement the NFSv4.2 CLONE operation Christoph Hellwig

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=20151208040504.GA2791@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=bfields@fieldses.org \
    --cc=hch@lst.de \
    --cc=jeff.layton@primarydata.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=tao.peng@primarydata.com \
    /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 NNTP newsgroup(s).