From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423041AbbFEPD4 (ORCPT ); Fri, 5 Jun 2015 11:03:56 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:33534 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030223AbbFEPDu (ORCPT ); Fri, 5 Jun 2015 11:03:50 -0400 Date: Fri, 5 Jun 2015 08:03:48 -0700 From: Christoph Hellwig To: Ming Lei Cc: linux-kernel@vger.kernel.org, Dave Kleikamp , Jens Axboe , Zach Brown , Christoph Hellwig , Maxim Patlasov , Andrew Morton , Alexander Viro , Tejun Heo , Dave Chinner Subject: Re: [PATCH v4 1/5] fs: kiocb: introduce IOCB_DONT_DIRTY_PAGE flag for direct IO Message-ID: <20150605150348.GA6835@infradead.org> References: <1432881338-898-1-git-send-email-ming.lei@canonical.com> <1432881338-898-2-git-send-email-ming.lei@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1432881338-898-2-git-send-email-ming.lei@canonical.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As mentioned last time a big fat NAK for this one. We generally do not dirty kernel pages anywhere, so a flag that must alway be set for default behavior just to prepare for a highy hypothetical user that in the future might want to abuse the interface is a no-go. Just make the dirtying behavior dependent on the iov_iter type: dirty for ITER_IOVEC and do nothing for ITER_KVEC and ITER_BVEC.