Re: Tailmerging for Ext2

2000-07-26 Thread Alexander Viro
On Wed, 26 Jul 2000, Daniel Phillips wrote: Stephen asked me some sharp questions about how this would work, and after I answered them to his satisfaction he asked me if I would have time to implement this feature. I said yes, and went on to write an initial design document describing

Re: Tailmerging for Ext2

2000-07-26 Thread Stephen C. Tweedie
Hi, On Wed, Jul 26, 2000 at 02:05:11PM -0400, Alexander Viro wrote: Here is one more for you: Suppose we grow the last fragment/tail/whatever. Do you copy the data out of that shared block? If so, how do you update buffer_heads in pages that cover the relocated data? (Same goes for

Re: Tailmerging for Ext2

2000-07-26 Thread Alexander Viro
On Wed, 26 Jul 2000, Stephen C. Tweedie wrote: Hi, On Wed, Jul 26, 2000 at 02:05:11PM -0400, Alexander Viro wrote: Here is one more for you: Suppose we grow the last fragment/tail/whatever. Do you copy the data out of that shared block? If so, how do you update buffer_heads in

Re: Tailmerging for Ext2

2000-07-26 Thread Daniel Phillips
On Wed, 26 Jul 2000, Alexander Viro wrote: On Wed, 26 Jul 2000, Daniel Phillips wrote: Stephen asked me some sharp questions about how this would work, and after I answered them to his satisfaction he asked me if I would have time to implement this feature. I said yes, and went on

Re: Tailmerging for Ext2

2000-07-26 Thread Alexander Viro
On Wed, 26 Jul 2000, Daniel Phillips wrote: If so, how do you update buffer_heads in pages that cover the relocated data? We have to be sure that if blocks are buffered then they are buffered in exactly one place and you always access them through through the buffer hash table. So

Re: Tailmerging for Ext2

2000-07-26 Thread Stephen C. Tweedie
Hi, On Wed, Jul 26, 2000 at 02:56:01PM -0400, Alexander Viro wrote: Not. Data normally is in page. Buffer_heads are not included into buffer cache. They are refered from the struct page and their -b_data just points to appropriate pieces of page. You can not get them via bread(). At all.

Re: Tailmerging for Ext2

2000-07-26 Thread Stephen C. Tweedie
Hi, On Wed, Jul 26, 2000 at 02:41:44PM -0400, Alexander Viro wrote: For tail writes, I'd imagine we would just end up using the page cache as a virtual cache as NFS uses it, and doing plain copy into the buffer cache pages. Ouch. I _really_ don't like it - we end up with special

Re: Tailmerging for Ext2

2000-07-26 Thread Alexander Viro
On Wed, 26 Jul 2000, Stephen C. Tweedie wrote: Hi, On Wed, Jul 26, 2000 at 02:56:01PM -0400, Alexander Viro wrote: Not. Data normally is in page. Buffer_heads are not included into buffer cache. They are refered from the struct page and their -b_data just points to appropriate

Re: Tailmerging for Ext2

2000-07-26 Thread Alexander Viro
On Wed, 26 Jul 2000, Stephen C. Tweedie wrote: Hi, On Wed, Jul 26, 2000 at 02:41:44PM -0400, Alexander Viro wrote: For tail writes, I'd imagine we would just end up using the page cache as a virtual cache as NFS uses it, and doing plain copy into the buffer cache pages.

Re: Tailmerging for Ext2

2000-07-26 Thread Chris Mason
On Wed, 26 Jul 2000, Daniel Phillips wrote: I don't know exactly what ReiserFS does - I just heard Hans mention the term 'tail merging' and I could see that it was a good idea. I'll give the quick and dirty answer, if people want more details, let me know. In 2.2, reiserfs_file_write

Re: Tailmerging for Ext2

2000-07-26 Thread Alexander Viro
On Wed, 26 Jul 2000, Chris Mason wrote: In both releases, there is locking on the tail to prevent races, and we don't bother with tails on files 16k (configurable). What granularity do you have? (for tail size, that is).

Re: Tailmerging for Ext2

2000-07-26 Thread Chris Mason
On Wed, 26 Jul 2000, Alexander Viro wrote: On Wed, 26 Jul 2000, Chris Mason wrote: In both releases, there is locking on the tail to prevent races, and we don't bother with tails on files 16k (configurable). What granularity do you have? (for tail size, that is). From 1