From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751303AbdAQUpR (ORCPT ); Tue, 17 Jan 2017 15:45:17 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:43548 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059AbdAQUpB (ORCPT ); Tue, 17 Jan 2017 15:45:01 -0500 Date: Tue, 17 Jan 2017 15:44:53 -0500 (EST) Message-Id: <20170117.154453.1379705071819128189.davem@davemloft.net> To: hch@infradead.org Cc: dave.kleikamp@oracle.com, viro@zeniv.linux.org.uk, sparclinux@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] coredump: Ensure proper size of sparse core files From: David Miller In-Reply-To: <20170117075521.GA19654@infradead.org> References: <32910821-8b16-1107-20de-b34d029b3e9a@oracle.com> <20170116.224243.706466650029722351.davem@davemloft.net> <20170117075521.GA19654@infradead.org> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 17 Jan 2017 11:45:48 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christoph Hellwig Date: Mon, 16 Jan 2017 23:55:21 -0800 > On Mon, Jan 16, 2017 at 10:42:43PM -0500, David Miller wrote: >> The lseek() done by dump_skip() should extend the file properly. > > lseek never extends a file. It just moves the current file position. > So if you do not have a write after the lseek it does nothing. Ok, then the only other feedback I have is that we should probably defer this truncate() call until the last possible dump write occurs rather than right after the VMA loop.