[Top] [All Lists]

Re: [PATCH 0/5] splice: locking changes and code refactoring

To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH 0/5] splice: locking changes and code refactoring
From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Date: Sat, 18 Jan 2014 07:56:47 +0000
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, Mark Fasheh <mfasheh@xxxxxxxx>, Joel Becker <jlbec@xxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx, Sage Weil <sage@xxxxxxxxxxx>, Steve French <sfrench@xxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20140118074649.GF10323@xxxxxxxxxxxxxxxxxx>
References: <20131212181459.994196463@xxxxxxxxxxxxxxxxxxxxxx> <20140113141416.GA30117@xxxxxxxxxxxxx> <20140113235646.GR10323@xxxxxxxxxxxxxxxxxx> <20140114132207.GA25170@xxxxxxxxxxxxx> <20140114172033.GU10323@xxxxxxxxxxxxxxxxxx> <20140118064040.GE10323@xxxxxxxxxxxxxxxxxx> <CA+55aFw4LgyYEkygxHUnpKZg3jMACGzsyENc9a9rWFmLcaRefQ@xxxxxxxxxxxxxx> <20140118074649.GF10323@xxxxxxxxxxxxxxxxxx>
Sender: Al Viro <viro@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Jan 18, 2014 at 07:46:49AM +0000, Al Viro wrote:

> Um...
> int pipe_to_file(struct pipe_inode_info *pipe, struct pipe_buffer *buf,
>                  struct splice_desc *sd)
> ...
>         if (buf->page != page) {
>                 char *src = buf->ops->map(pipe, buf, 1);
>                 char *dst = kmap_atomic(page);
>                 memcpy(dst + offset, src + buf->offset, this_len);
>                 flush_dcache_page(page);
>                 kunmap_atomic(dst);
>                 buf->ops->unmap(pipe, buf, src);
>       }

BTW, that if (buf->page != page) is always true - it's a leftover from
before Nick's removal of ->steal() uses in pipe_to_file() (as well as
the big fat comment in front of that function that had lost any relation
to what it's doing 7 years ago)...

Is there anybody maintaining fs/splice.c these days?  I'd been doing
massive RTFS in that area lately, but it would certainly be nice to
have some braindump on the design and issues in that thing, preferably
still matching the code...

<Prev in Thread] Current Thread [Next in Thread>