Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Daniel Phillips
Christoph Hellwig wrote: On Tue, Nov 14, 2000 at 12:04:21PM +0100, Daniel Phillips wrote: After quite a lot of grepping in 2.4.0-test10 I was unable to find any places where address_mapping-host is not (struct inode *) - are there any? I can't find one. This change was requested some

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Daniel Phillips
Alexander Viro wrote: On Tue, 14 Nov 2000, Daniel Phillips wrote: After quite a lot of grepping in 2.4.0-test10 I was unable to find any places where address_mapping-host is not (struct inode *) - are there any? Currently - none. As soon as block devices go to pagecache we'll have

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Alexander Viro
On Wed, 15 Nov 2000, Daniel Phillips wrote: OK, now I'm confused. Will there be a sure way of knowing what kind of object -host points to? An efficient way would be even nicer. Why would it wrong for *every* address_space to have an inode and a superblock? Or at least, Huh? What

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Steve Lord
Currently - none. As soon as block devices go to pagecache we'll have such beasts (you need one address_space for all inodes with given major:minor, so -host can't point to any of them). Possibly earlier, if somebody will need address_space in some other situation where we need some

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Alexander Viro
On Wed, 15 Nov 2000, Steve Lord wrote: I would expect that once there was more than one type of object hiding behind the address_space the only way to access it would be via the address_space ops vector, just like the private inode data. As for the Wrong tense ;-) s/was/will be/. Block

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Steve Lord
On Wed, 15 Nov 2000, Steve Lord wrote: I would expect that once there was more than one type of object hiding behind the address_space the only way to access it would be via the address_space ops vector, just like the private inode data. As for the Wrong tense ;-) s/was/will be/.

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Daniel Phillips
Daniel Phillips wrote: Even if I can find the filesystem that belongs to a given page, how does the filesystem find a (struct file *) for the page so it can do address_space-writepage? Never mind, I know what to do here - don't use the address_space function, write my own. Not as clean as

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Alexander Viro
On Wed, 15 Nov 2000, Steve Lord wrote: On Wed, 15 Nov 2000, Steve Lord wrote: I would expect that once there was more than one type of object hiding behind the address_space the only way to access it would be via the address_space ops vector, just like the private inode

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Alexander Viro
On Wed, 15 Nov 2000, Daniel Phillips wrote: Daniel Phillips wrote: Even if I can find the filesystem that belongs to a given page, how does the filesystem find a (struct file *) for the page so it can do address_space-writepage? Never mind, I know what to do here - don't use the

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Daniel Phillips
Steve Lord wrote: Currently - none. As soon as block devices go to pagecache we'll have such beasts (you need one address_space for all inodes with given major:minor, so -host can't point to any of them). Possibly earlier, if somebody will need address_space in some other

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Alexander Viro
On Wed, 15 Nov 2000, Daniel Phillips wrote: It's used in nfs and smbfs - that's as far as I've checked so far - I wouldn't be surprised to find it's used in all the network filesystems. My question is: why? Why can't the network filesystems make the accomodation here, instead of all the

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Rik van Riel
On Tue, 14 Nov 2000, Alexander Viro wrote: On Tue, 14 Nov 2000, Daniel Phillips wrote: After quite a lot of grepping in 2.4.0-test10 I was unable to find any places where address_mapping-host is not (struct inode *) - are there any? Currently - none. As soon as block devices go to

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Alexander Viro
On Wed, 15 Nov 2000, Rik van Riel wrote: On Tue, 14 Nov 2000, Alexander Viro wrote: On Tue, 14 Nov 2000, Daniel Phillips wrote: After quite a lot of grepping in 2.4.0-test10 I was unable to find any places where address_mapping-host is not (struct inode *) - are there any?

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Rik van Riel
On Wed, 15 Nov 2000, Alexander Viro wrote: On Wed, 15 Nov 2000, Rik van Riel wrote: On Tue, 14 Nov 2000, Alexander Viro wrote: On Tue, 14 Nov 2000, Daniel Phillips wrote: After quite a lot of grepping in 2.4.0-test10 I was unable to find any places where address_mapping-host is

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Tigran Aivazian
On Wed, 15 Nov 2000, Alexander Viro wrote: But we _never_ had cache consistency between the fs and raw device accesses. Alexander, do I understand you correctly, i.e. do you really mean "raw" device or do you mean block device? If we don't have the cache consistency between (pagecache-aware)

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Alexander Viro
On Wed, 15 Nov 2000, Tigran Aivazian wrote: On Wed, 15 Nov 2000, Alexander Viro wrote: But we _never_ had cache consistency between the fs and raw device accesses. Alexander, do I understand you correctly, i.e. do you really mean "raw" device or do you mean block device? If we

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Daniel Phillips
Alexander Viro wrote: On Wed, 15 Nov 2000, Rik van Riel wrote: On Tue, 14 Nov 2000, Alexander Viro wrote: On Tue, 14 Nov 2000, Daniel Phillips wrote: After quite a lot of grepping in 2.4.0-test10 I was unable to find any places where address_mapping-host is not (struct inode

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Daniel Phillips
Daniel Phillips wrote: ...At this point we need to be to get the page's inode efficiently - it's sitting there in the -host field, no problem, except now you're talking about putting other things there with no way to know what they are. Do you have another suggestion on how to find the

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Daniel Phillips
Alexander Viro wrote: Anyway, yes, fs-wide metadata is an obvious user for that stuff. E.g. for FFS-like beasts inode table just begs for such treatment. Waiting for 2.5... Patch treats cylinder group descriptors as analogs of indirect blocks - that allows to play with alternative allocation

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Alexander Viro
On Thu, 16 Nov 2000, Daniel Phillips wrote: The conversion from page back to inode needs the -host field to be an inode, reliably. Why would we want to do such a conversion? It's when the mm runs low on memory and wants to flush a dirty, inactive page. When it finds one, it looks at the

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Alexander Viro
On Thu, 16 Nov 2000, Daniel Phillips wrote: Daniel Phillips wrote: ...At this point we need to be to get the page's inode efficiently - it's sitting there in the -host field, no problem, except now you're talking about putting other things there with no way to know what they are. Do

Re: Is address_mapping-host always (struct inode *)?

2000-11-15 Thread Alexander Viro
On Thu, 16 Nov 2000, Daniel Phillips wrote: For 4K blocksize on 4K page_size systems there isn't any wastage at all, and 1K filesystems *should* be small anyway - the metadata even smaller. It will be a little bit wasteful on 4K blocksize/8K page_size Hell knows. There is only one way to