* Is persistant preallocation possible?
@ 2010-05-25 2:05 Jeff Zheng
2010-05-25 2:26 ` Nathan Scott
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Zheng @ 2010-05-25 2:05 UTC (permalink / raw)
To: xfs@oss.sgi.com
[-- Attachment #1.1: Type: text/plain, Size: 444 bytes --]
Hi,
We are trying to control where the files are being allocated on the disks, and we tried xfs preallocation. What we found is that each time the file being reopened the location of the pre-allocated space could change (not all the time). Is there a way to do persistent preallocation in xfs, like the same file will always be on the same location on the disk given that the requested size doesn't change?
Thanks in advance.
Jeff
[-- Attachment #1.2: Type: text/html, Size: 2882 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is persistant preallocation possible?
2010-05-25 2:05 Is persistant preallocation possible? Jeff Zheng
@ 2010-05-25 2:26 ` Nathan Scott
2010-05-25 3:19 ` Eric Sandeen
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Scott @ 2010-05-25 2:26 UTC (permalink / raw)
To: Jeff Zheng; +Cc: xfs
----- "Jeff Zheng" <Jeff.Zheng@endace.com> wrote:
> Hi,
>
> We are trying to control where the files are being allocated on the
> disks, and we tried xfs preallocation. What we found is that each time
> the file being reopened the location of the pre-allocated space could
> change (not all the time). Is there a way to do persistent
> preallocation in xfs, like the same file will always be on the same
> location on the disk given that the requested size doesn’t change?
>
Sounds like you are truncating the file (on open?), and hence discarding
the preallocation. XFS preallocation is persistent already, so I think
something you are doing must be discarding those preallocated extents.
Could you post a test program, or sequence of xfs_io commands, that would
demonstrate the problem?
cheers.
--
Nathan
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is persistant preallocation possible?
2010-05-25 2:26 ` Nathan Scott
@ 2010-05-25 3:19 ` Eric Sandeen
2010-05-25 12:33 ` Roger Willcocks
0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2010-05-25 3:19 UTC (permalink / raw)
To: Nathan Scott; +Cc: Jeff Zheng, xfs
Nathan Scott wrote:
> ----- "Jeff Zheng" <Jeff.Zheng@endace.com> wrote:
>
>> Hi,
>>
>> We are trying to control where the files are being allocated on the
>> disks, and we tried xfs preallocation. What we found is that each time
>> the file being reopened the location of the pre-allocated space could
>> change (not all the time). Is there a way to do persistent
>> preallocation in xfs, like the same file will always be on the same
>> location on the disk given that the requested size doesn’t change?
>>
>
> Sounds like you are truncating the file (on open?), and hence discarding
> the preallocation. XFS preallocation is persistent already, so I think
> something you are doing must be discarding those preallocated extents.
>
> Could you post a test program, or sequence of xfs_io commands, that would
> demonstrate the problem?
>
> cheers.
>
... maybe you mean that truncating / pre-allocating the same space repeatedly
on the same filename ends up with blocks mapped in different locations...?
That's entirely expected... nothing about the preallocation interface lets
you "control *where* files are being allocated" as you said above...
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is persistant preallocation possible?
2010-05-25 3:19 ` Eric Sandeen
@ 2010-05-25 12:33 ` Roger Willcocks
0 siblings, 0 replies; 4+ messages in thread
From: Roger Willcocks @ 2010-05-25 12:33 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Jeff Zheng, Nathan Scott, xfs
On Mon, 2010-05-24 at 22:19 -0500, Eric Sandeen wrote:
> Nathan Scott wrote:
> > ----- "Jeff Zheng" <Jeff.Zheng@endace.com> wrote:
> >
> >> Hi,
> >>
> >> We are trying to control where the files are being allocated on the
> >> disks, and we tried xfs preallocation. What we found is that each time
> >> the file being reopened the location of the pre-allocated space could
> >> change (not all the time). Is there a way to do persistent
> >> preallocation in xfs, like the same file will always be on the same
> >> location on the disk given that the requested size doesn’t change?
> >>
> >
> > Sounds like you are truncating the file (on open?), and hence discarding
> > the preallocation. XFS preallocation is persistent already, so I think
> > something you are doing must be discarding those preallocated extents.
> >
> > Could you post a test program, or sequence of xfs_io commands, that would
> > demonstrate the problem?
> >
> > cheers.
> >
>
> ... maybe you mean that truncating / pre-allocating the same space repeatedly
> on the same filename ends up with blocks mapped in different locations...?
> That's entirely expected... nothing about the preallocation interface lets
> you "control *where* files are being allocated" as you said above...
>
Way back when I wrote some code to do just this, but I've never had the
time to wrap it all up. The basic idea is to add another argument to
preallocate, as a hint where to try first. The allocator then uses the
'extend file' path, with the hint taking the place of the current eof.
See http://oss.sgi.com/archives/xfs/2006-07/msg01005.html
for my original patches. I'd still like to have these pushed through -
what would it take?
--
Roger Willcocks <roger@filmlight.ltd.uk>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-05-25 12:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-25 2:05 Is persistant preallocation possible? Jeff Zheng
2010-05-25 2:26 ` Nathan Scott
2010-05-25 3:19 ` Eric Sandeen
2010-05-25 12:33 ` Roger Willcocks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox