lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sun, 08 Jul 2007 15:13:31 +0200
From:	"Ninel Evol" <myLC@....net>
To:	linux-ext4@...r.kernel.org
Subject: inserting/deleting into/from the middle of large files?


'lo there, =)

having a DVB-S receiver running Linux (PPC) I found myself 
wondering how to delete data from the middle of a large file 
(stripping a recording of ads, for example - or messing 
around in a virtual disk file, etc.). Currently, the common 
way of doing this seems to be by copying the file (leaving a 
part behind) and then deleting the original. Of course, on a 
large file (say 12 GB) this can take an eternity; also you 
can run into trouble if the filesystem is nearly full...

Is it me, or doesn't that make any sense?
Having a block-oriented filesystem, operations like this 
should only take an instance.

So basically I'm looking for functions to:
- insert a chunk into a file
- delete a chunk from a file
- move a chunk from one file into another

All of the above would be very useful when dealing with 
large data, such as DVB-recordings (Linux being the nr.1 OS 
on those receivers, naturally:-).

Seeing a large file as a chain of blocks, making such an 
operation on a block-sized basis should already be easy to 
accomplish. However, if you want full support there should 
be the possibility to insert "sparse blocks" (less content 
than the usual) within a chain of blocks (including the 
beginning).

Is this already possible?
Would it be difficult to implement?

Think about it: instead of copying gigabytes with the 
drive's heads clicking around - taking minutes to hours, 
such operations could be performed in (milli)seconds.

I think that there should indeed be a standard (Posix?) for 
providing such functionality. (One call could be to 
determine if the filesystem supports those operations fast -
it could return a version for instance, 0 meaning that the 
operations, although provided, will be slow.)

What is needed in the first place however, is a filesystem 
supporting those operations - making it first choice for 
VDRs running Linux. (The others would surely follow soon 
after, at which point there should be the chance for 
establishing a standard.)


Looking forward for some enlightenment... :-)

                                           LC (myLC@....net)


-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ