9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: geoff@collyer.net
To: 9fans@cse.psu.edu
Subject: Re: [9fans] truncation via wstat on ken's fs
Date: Sun, 17 Oct 2004 17:43:25 -0700	[thread overview]
Message-ID: <7ea713cb549c1d7b91a32c77987b62c2@collyer.net> (raw)
In-Reply-To: <ee9e417a04101710012bdf8410@mail.gmail.com>

Good point, Russ, and I had done something similar (cloned dtrunc()
and added a length argument).

Ken frees blocks in reverse order (last block freed first), presumably
to assist repairs if the system should crash in the middle of it, or
something of the sort.  The obvious way to truncate is to walk to the
point of truncation, zero any partial block after it, then free data
blocks (and if feasible indirect blocks) while walking to EOF.  Doing
this backward is a little messier.



  reply	other threads:[~2004-10-18  0:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-17 11:05 geoff
2004-10-17 11:18 ` Brantley Coile
2004-10-17 17:01 ` Russ Cox
2004-10-18  0:43   ` geoff [this message]
2004-10-18  8:03     ` Charles Forsyth
2004-10-18  8:24       ` geoff
2004-10-18  8:36         ` Charles Forsyth
2004-10-18  8:38           ` geoff
2004-10-17 17:35 ` boyd, rounin
2004-10-17 13:19 Aharon Robbins

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=7ea713cb549c1d7b91a32c77987b62c2@collyer.net \
    --to=geoff@collyer.net \
    --cc=9fans@cse.psu.edu \
    /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;
as well as URLs for NNTP newsgroup(s).