]> git.baikalelectronics.ru Git - kernel.git/commit
zonefs: Do not ignore explicit_open with active zone limit
authorDamien Le Moal <damien.lemoal@opensource.wdc.com>
Thu, 2 Jun 2022 12:33:25 +0000 (21:33 +0900)
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>
Wed, 8 Jun 2022 06:38:44 +0000 (15:38 +0900)
commit40334ed69698de77bdac43a9017b1274022a3d2e
tree7bb705027e2513d25ca5ab1cdfbbc3a2b731877b
parent9e345e07df5e2a87797c1b47c083f9fb2669272c
zonefs: Do not ignore explicit_open with active zone limit

A zoned device may have no limit on the number of open zones but may
have a limit on the number of active zones it can support. In such
case, the explicit_open mount option should not be ignored to ensure
that the open() system call activates the zone with an explicit zone
open command, thus guaranteeing that the zone can be written.

Enforce this by ignoring the explicit_open mount option only for
devices that have both the open and active zone limits equal to 0.

Fixes: 76dff81de8fc ("zonefs: Add active seq file accounting")
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/zonefs/super.c