| To: | "linux-xfs@xxxxxxxxxxx" <linux-xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | Trouble using IOC_XFS_FREESP |
| From: | "Ian S. Nelson" <ian.nelson@xxxxxxxxxxxx> |
| Date: | Tue, 02 Oct 2001 18:26:30 -0600 |
| Organization: | Echostar |
| Reply-to: | ian.nelson@xxxxxxxxxxxx |
| Sender: | owner-linux-xfs@xxxxxxxxxxx |
I'm hacking together a little "trim()" function and I'm having trouble
getting it to work.
Here is my code:
int trim(int fd, unsigned long long offset)
{
struct xfs_flock64 flock;
int rc;
flock.l_whence = 0;
flock.l_start = 0;
flock.l_len = offset;
rc = ioctl( fd, XFS_IOC_FREESP, &flock );
printf("rc: %d\n", rc);
}
And I'm always ending up with 0 length files when I'm done. I'm
creating a file of 20000 bytes and then trying to poke a hole in the
first 10000 bytes. Am I missing something? I don't have the irix man
pages so I'm kind of guessing. rc is 0 (zero) when I run it.
thanks,
Ian
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: corruption on 2.4.6 w/ low memory?, Sidik Isani |
|---|---|
| Next by Date: | Re: IRIX 6.5.6m/XFS CVS: Any problems?, Sean Elble |
| Previous by Thread: | TAKE - fix hang with mmap writes to a full filesystem, Steve Lord |
| Next by Thread: | TAKE - xfsprogs docs, mainly, Nathan Scott |
| Indexes: | [Date] [Thread] [Top] [All Lists] |