[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CADmgqai5Ohnnq9G3Sm87pujtD3iMcUwGEqpLds2nDQroXgNxeg@mail.gmail.com>
Date: Thu, 30 Nov 2023 19:25:35 +0200
From: Alexandru Goia <goia.i.alexandru@...il.com>
To: linux-kernel@...r.kernel.org, linux-kernel@...e.kernel.org
Subject: Linux 4 block device driver infrastructure
Greetings !
I am a Unix/Linux hobbyist from Romania, interested in kernel stuff.
I need some clarifications, related to block device subsystem in Linux 4,
so I will ask them here, if you can answer me, please...
1) Why (in Linux 4) in struct block_device_operations, the
(*open)(struct block_device *, fmode_t)
has a different signature than the (*release)(struct gendisk *,
fmode_t) ? Why open()
uses block_device, while release() uses gendisk ? They are both in a struct
block_device_operations. Why they not refer to the same thing ?
I understand that gendisk refer to a real disk, and block_device (s)
to logical disk (s)
and partitions. But why the kernel developers have chosen to use
different signatures ?
2) Release() is also synonim to close() ?
3) Why is not explicitely present a close() function ?
4) Why struct gendisk does not have inside it pointers to struct block_device ?
Thank you very much,
Alexander,
Computer hobbyist,
Romania
Please answer also to my personal address : <goia.i.alexandru@...il.com>
Powered by blists - more mailing lists