Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965075AbWIEPAH (ORCPT ); Tue, 5 Sep 2006 11:00:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965073AbWIEPAH (ORCPT ); Tue, 5 Sep 2006 11:00:07 -0400 Received: from mail.parknet.jp ([210.171.160.80]:34310 "EHLO parknet.jp") by vger.kernel.org with ESMTP id S965075AbWIEPAD (ORCPT ); Tue, 5 Sep 2006 11:00:03 -0400 X-AuthUser: hirofumi@parknet.jp To: Mattias =?iso-8859-1?Q?R=F6nnblom?= Cc: linux-kernel@vger.kernel.org Subject: Re: VFAT truncate performance References: From: OGAWA Hirofumi Date: Tue, 05 Sep 2006 23:59:52 +0900 In-Reply-To: (Mattias =?iso-8859-1?Q?R=F6nnblom's?= message of "05 Sep 2006 15\:52\:46 +0200") Message-ID: <8764g28il3.fsf@duaron.myhome.or.jp> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 940 Lines: 22 Mattias R?nnblom writes: > extending files by ftruncate(2) runs very slow on VFAT file > systems. On my USB harddisk w/ VFAT, it takes 14 seconds to extend an > empty file to 1 GB. On a memory stick, it takes well over 4 minutes. > > My question is: is this problem on the conceptual level (ie there is > no way of extending files on FAT that doesn't involve many disk > operations) or is the current Linux fs driver suboptimal in this > respect? Unfortunately FAT doesn't support sparse file, so ftruncate(2) which extend size needs to fill all clusters with zero, and write data. This is limitation of FAT filesystem. -- OGAWA Hirofumi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/