All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carl-Daniel Hailfinger <c-d.hailfinger.kernel.2003@gmx.net>
To: "Ragnar Kjørstad" <reiserfs@ragnark.vestdata.no>
Cc: Oleg Drokin <green@namesys.com>, Hans Reiser <reiser@namesys.com>,
	Cyrille Chepelov <cyrille@chepelov.org>,
	reiserfs-list@namesys.com, linux-fsdevel@vger.kernel.org
Subject: Re: FIFO files
Date: Wed, 18 Jun 2003 13:40:06 +0200	[thread overview]
Message-ID: <3EF04F96.7030406@gmx.net> (raw)
In-Reply-To: <20030618102057.GA22264@vestdata.no>

It might be more appropriate to continue discussing this at linux-fsdevel.

Ragnar Kjørstad wrote:
> On Wed, Jun 18, 2003 at 10:17:21AM +0400, Oleg Drokin wrote:
> 
>>Hello!
>>
>>On Tue, Jun 17, 2003 at 07:00:25PM +0200, Carl-Daniel Hailfinger wrote:
>>
>>>Yes, but if I understood Cyrille correctly, her/his(?) needs should be
>>>completely satisfied by sparse files.
>>>One process can append records at the end, and one other process can read
>>>records from the beginning of the file, marking the read data empty. The
>>
>>Hm, I am sorry, but this part is unclear.
>>I do not remember any API to create holes in existing files in place of already
>>present data.
> 
> 
> There isn't one.
> 
> XFS uses an ioctl to punch holes, dm_punch_hole, but it's prototype is
> specific to XDSM.
> 
> Once multiple filesystems implement the same functionality it makes sense 
> to have a common interface - maybe a new entry in struct
> inode_operations, and a corresponding systemcall?
> 
> Something like:
> int punch_hole(const char *path, off_t offset, size_t len);
> int fpunch_hole(int fd, off_t offset, size_t len);

make_hole or zap_range would be alternative names.


> The reader of the file would have to punch the holes after reading the
> data. IMHO punch_hole should not "move" the contents of the file, so the
> data is still available at the same offsets. If one rather would like
> the data to be available at the beginning of the file at all times
> something else is needed, maybe:
> 
> int truncate_start(const char *path, off_t offset);
> int ftruncate_start(int fd, off_t offset);
> 
> that truncates the beginning of the file, moving the data from pos
> offset to pos 0.
> 
> 
> But punch_hole is much more generic, and could be useful in cases like
> HSM and others. Basicly I think punch_hole is just something missing
> from the linux VFS - logically it should be there. It should be
> relatively easy to implement on all filesystems supporting sparse files,
> as the end result is the same.
> 
> Truncate_start is another beast. One some filesystems like ext2/3 it
> would not be possible to implement it effectively for large files, and
> there are problems with offsets that are not multiple of the blocksize.


Regards,
Carl-Daniel


  reply	other threads:[~2003-06-18 11:40 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-17 16:21 FIFO files Cyrille Chepelov
2003-06-17 16:24 ` Carl-Daniel Hailfinger
2003-06-17 16:32   ` Hans Reiser
2003-06-17 17:00     ` Carl-Daniel Hailfinger
2003-06-18  6:17       ` Oleg Drokin
2003-06-18 10:20         ` Ragnar Kjørstad
2003-06-18 11:40           ` Carl-Daniel Hailfinger [this message]
2003-06-18 13:21             ` Hans Reiser
2003-06-18 13:53             ` David Woodhouse
2003-06-18 14:28               ` Matthew Wilcox
2003-06-18 15:23                 ` Russell Coker
2003-06-18 15:40                   ` David Woodhouse
2003-06-18 15:51                   ` Bryan Henderson
2003-06-18 15:45                 ` Bryan Henderson
2003-06-18 15:34             ` Bryan Henderson
2003-06-17 17:07   ` Cyrille Chepelov
2003-06-17 17:39     ` Chris Dukes
2003-06-17 17:54       ` Cyrille Chepelov
2003-06-17 19:30     ` Hans Reiser
2003-06-17 19:43       ` Cyrille Chepelov
2003-06-17 22:42 ` Pierre Abbat

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=3EF04F96.7030406@gmx.net \
    --to=c-d.hailfinger.kernel.2003@gmx.net \
    --cc=cyrille@chepelov.org \
    --cc=green@namesys.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=reiser@namesys.com \
    --cc=reiserfs-list@namesys.com \
    --cc=reiserfs@ragnark.vestdata.no \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.