mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: kill i_dev
@ 2002-11-21 18:12 Andries.Brouwer
  0 siblings, 0 replies; 5+ messages in thread
From: Andries.Brouwer @ 2002-11-21 18:12 UTC (permalink / raw)
  To: Andries.Brouwer, viro; +Cc: linux-kernel, torvalds

    From: Alexander Viro <viro@math.psu.edu>

    On Thu, 21 Nov 2002 Andries.Brouwer@cwi.nl wrote:

    > Yes, I looked at that but concluded that someone (you?)
    > had added the assignment just to preserve the guarantee
    > previously given by get_empty_inode() at the moment it
    > was replaced by new_inode(). But it is superfluous, I think.

    Existing userland doesn't, though.

I saw that you hit fuser last year, but this is 2.5.
Any other examples?

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: kill i_dev
@ 2002-11-21  1:33 Andries.Brouwer
  2002-11-21  2:58 ` Alexander Viro
  0 siblings, 1 reply; 5+ messages in thread
From: Andries.Brouwer @ 2002-11-21  1:33 UTC (permalink / raw)
  To: Andries.Brouwer, viro; +Cc: linux-kernel, torvalds

> We can kill i_dev.  
> BTW, watch out for socket.c use of ->i_dev.

Yes, I looked at that but concluded that someone (you?)
had added the assignment just to preserve the guarantee
previously given by get_empty_inode() at the moment it
was replaced by new_inode(). But it is superfluous, I think.

> However, rdev and [cb]dev will have to remain separate.

We can fight later on that one. My point of view is
that just like i_dev is a field in i_sb, also i_rdev
can be retrieved from i_[cb]dev.

Something else is kdev_t. I liked it when it was a pointer.
Now it is just garbage and the kernel is full of conversions
to and from. Is there any reason not to throw out all of kdev_t?
That is, is there a reason to have a kdev_t different from dev_t?

Andries


^ permalink raw reply	[flat|nested] 5+ messages in thread
* kill i_dev
@ 2002-11-21  0:07 Andries.Brouwer
  2002-11-21  0:39 ` Alexander Viro
  0 siblings, 1 reply; 5+ messages in thread
From: Andries.Brouwer @ 2002-11-21  0:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds, viro

One disadvantage of enlarging the size of dev_t is
that struct inode grows. Bad.
We used to have i_dev and i_rdev; today i_rdev has split into
i_rdev, i_bdev and i_cdev. Bad.

It looks like these four fields can be replaced by a single one,
making struct inode smaller. Not bad.

The first step would be to delete the field i_dev, and
all assignments to it, and replace all remaining occurrences
by i_sb->s_dev.

Roughly speaking, the only use of this field is in the stat
system call.

Any objections?

Andries


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-11-21 18:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-21 18:12 kill i_dev Andries.Brouwer
  -- strict thread matches above, loose matches on Subject: below --
2002-11-21  1:33 Andries.Brouwer
2002-11-21  2:58 ` Alexander Viro
2002-11-21  0:07 Andries.Brouwer
2002-11-21  0:39 ` Alexander Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®