From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751302AbdAQVBn (ORCPT ); Tue, 17 Jan 2017 16:01:43 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:25415 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751078AbdAQVBl (ORCPT ); Tue, 17 Jan 2017 16:01:41 -0500 Subject: Re: [PATCH RESEND] coredump: Ensure proper size of sparse core files To: David Miller , hch@infradead.org References: <32910821-8b16-1107-20de-b34d029b3e9a@oracle.com> <20170116.224243.706466650029722351.davem@davemloft.net> <20170117075521.GA19654@infradead.org> <20170117.154453.1379705071819128189.davem@davemloft.net> Cc: viro@zeniv.linux.org.uk, sparclinux@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org From: Dave Kleikamp Message-ID: <3238f60a-2638-5d9b-4d8d-f9118c90e7b5@oracle.com> Date: Tue, 17 Jan 2017 15:01:07 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170117.154453.1379705071819128189.davem@davemloft.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/17/2017 02:44 PM, David Miller wrote: > 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. Yeah. That's fine with me.