From: Andreas Dilger <adilger@turbolinux.com>
To: Pavel Machek <pavel@suse.cz>
Cc: Andreas Dilger <adilger@turbolinux.com>,
"Ph. Marek" <marek@bmlv.gv.at>,
linux-kernel@vger.kernel.org
Subject: Re: Q: sparse file creation in existing data?
Date: Mon, 9 Jul 2001 00:43:08 -0600 (MDT) [thread overview]
Message-ID: <200107090643.f696h9T6024429@webber.adilger.int> (raw)
In-Reply-To: <20010630113349.B50@toy.ucw.cz> "from Pavel Machek at Jun 30, 2001 11:33:50 am"
Pavel writes:
> > It could be used as a replacement for the truncate code, because then
> > truncate is simply a special case of punch, namely punch(0, end).
>
> I do not think so. Truncate leaves you with filesize 0, while punch schould
> leave you with filesize of original file.
I can't recall the exact details (it's been a year since I looked at the
code), but I believe that the VFS sets the file size before the call to
truncate, so it didn't matter on the exact semantics of the punch call.
Truncate still existed, but it was just a wrapper calling the punch code
to punch out all of the existing blocks.
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
prev parent reply other threads:[~2001-07-09 6:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.A32.3.95.1010629135834.61212E-100000@werner.exp-math. uni-essen.de>
2001-06-29 11:39 ` Ph. Marek
2001-06-29 12:20 ` Dr. Michael Weller
2001-06-29 12:55 ` Ph. Marek
2001-06-29 15:03 ` Daniel Phillips
2001-06-29 18:38 ` Andreas Dilger
2001-06-30 11:33 ` Pavel Machek
2001-07-09 6:43 ` Andreas Dilger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200107090643.f696h9T6024429@webber.adilger.int \
--to=adilger@turbolinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marek@bmlv.gv.at \
--cc=pavel@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®