Re: any one knows how to truncate a file from its begining ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Wed, Oct 22, 2008 at 8:44 PM, Raz <raziebe@xxxxxxxxx> wrote:
> I  think XFS can do it . it has some un/reserve  space ioctl.
> 3521        /*
> 3522         * XFS_IOC_RESVSP and XFS_IOC_UNRESVSP will reserve or unreserve
> 3523         * file space.
> 3524         * These calls do NOT zero the data space allocated to the file,
> 3525         * nor do they change the file size.
> 3526         *
> 3527         * XFS_IOC_ALLOCSP and XFS_IOC_FREESP will allocate and free file
> 3528         * space.
> 3529         * These calls cause the new file data to be zeroed and the file
> 3530         * size to be changed.
> 3531         */
>

Yes, only XFS can deallocate space from the beginning of the file.

I remember that the offset for the remaining data will remain identical.

On the XFS mailing list some example code was posted about one year ago.

Regards,
-- 
Leon

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux