From mboxrd@z Thu Jan 1 00:00:00 1970 From: Namjae Jeon Subject: Re: [PATCH v5 10/10] manpage: update FALLOC_FL_COLLAPSE_RANGE flag in fallocate Date: Tue, 27 May 2014 14:15:27 +0900 Message-ID: <001301cf796a$abe8aac0$03ba0040$@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, Theodore Ts'o , 'Christoph Hellwig' , Ashish Sangwan To: Dave Chinner Return-path: Received: from mailout1.samsung.com ([203.254.224.24]:50765 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751713AbaE0FPk (ORCPT ); Tue, 27 May 2014 01:15:40 -0400 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N6700IIIVXRVC30@mailout1.samsung.com> for linux-fsdevel@vger.kernel.org; Tue, 27 May 2014 14:15:27 +0900 (KST) Content-language: ko Sender: linux-fsdevel-owner@vger.kernel.org List-ID: > [ Hmmmm - I just had a great idea - removing entire directory > contents via punching blocks. No more "remove one dirent at a time" > for rm -rf, just punch the directory from start to end and there > goes millions of directory entries in a single syscall and a handful > of transactions. FALLOC_FL_DIR_PUNCH, anyone? ] Hi Dave. I think that it is a great idea also. BTW, FALLOC_FL_DIR_PUNCH should remove sub-directories using recursive function. If depth is very deep, Is it possible to make stack overflow issue ? Thanks.