From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753257AbcK0Cvr (ORCPT ); Sat, 26 Nov 2016 21:51:47 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:42000 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752755AbcK0Cvm (ORCPT ); Sat, 26 Nov 2016 21:51:42 -0500 Date: Sun, 27 Nov 2016 02:51:18 +0000 From: Al Viro To: Linus Torvalds Cc: Linux Kernel Mailing List , linux-fsdevel , Yan@ZenIV.linux.org.uk, Zheng , Zhu@ZenIV.linux.org.uk, Caifeng Subject: Re: [git pull] vfs fix Message-ID: <20161127025113.GX1555@ZenIV.linux.org.uk> References: <20161127011352.GV1555@ZenIV.linux.org.uk> <20161127022506.GW1555@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161127022506.GW1555@ZenIV.linux.org.uk> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 27, 2016 at 02:25:09AM +0000, Al Viro wrote: > Anyway, leaving that BUG_ON() had been wrong; I can send a followup > massaging that thing as you've suggested, if you are interested in > that. But keep in mind that the whole iov_iter_get_pages...() calling > conventions are going to be changed, hopefully soon. BTW, speaking of iov_iter_get_pages_alloc() callers and splice: "ceph: combine as many iovec as possile into one OSD request" has added static size_t dio_get_pagev_size(const struct iov_iter *it) { const struct iovec *iov = it->iov; const struct iovec *iovend = iov + it->nr_segs; size_t size; size = iov->iov_len - it->iov_offset; /* * An iov can be page vectored when both the current tail * and the next base are page aligned. */ while (PAGE_ALIGNED((iov->iov_base + iov->iov_len)) && (++iov < iovend && PAGE_ALIGNED((iov->iov_base)))) { size += iov->iov_len; } dout("dio_get_pagevlen len = %zu\n", size); return size; } ... with 'it' possibly being bio_vec-backed iterator. Could somebody explain what that code is trying to do? I would really like to hear details - I'm not saying that the goal mentioned in the commit message is worthless, but I don't know ceph codebase well enough to tell what would be a good way to implement that. In its current form it's obviously broken.