<div dir="ltr"><div>Greetings !</div><div><br></div><div class="gmail_quote"><div dir="ltr"><div>I am a Unix/Linux hobbyist from Romania, interested in kernel stuff.<br></div><div>I need some clarifications, related to block device subsystem in Linux 4,</div><div>so I will ask them here, if you can answer me, please...<br></div><div><br></div><div>1) Why (in Linux 4) in struct block_device_operations, the (*open)(struct block_device *, fmode_t)</div><div>has a different signature than the (*release)(struct gendisk *, fmode_t) ? Why open()</div><div>uses block_device, while release() uses gendisk ? They are both in a struct </div><div>block_device_operations. Why they not refer to the same thing ?</div><div><br></div><div>I understand that gendisk refer to a real disk, and block_device (s) to logical disk (s)</div><div>and partitions. But why the kernel developers have chosen to use different signatures ?<br></div><div><br></div><div>2) Release() is also synonim to close() ?</div><div>3) Why is not explicitely present a close() function ?</div><div>4) Why struct gendisk does not have inside it pointers to struct block_device ?</div><div><br></div><div>Thank you very much,</div><div>Alexander,</div><div>Computer hobbyist,</div><div>Romania<div class="gmail-yj6qo"></div><div class="gmail-adL"><br><br></div></div></div></div></div>