Now that the hd_struct always has a block device attached to it, there is
no need for having two size field that just get out of sync.
Additional the field in hd_struct did not use proper serializiation,
possibly allowing for torn writes. By only using the block_device field
this problem also get
On Thu 26-11-20 14:04:07, Christoph Hellwig wrote:
> Now that the hd_struct always has a block device attached to it, there is
> no need for having two size field that just get out of sync.
>
> Additional the field in hd_struct did not use proper serializiation,
^^ Additionaly
On Thu, Nov 26, 2020 at 05:50:36PM +0100, Jan Kara wrote:
> > + if (size == capacity ||
> > + (disk->flags & (GENHD_FL_UP | GENHD_FL_HIDDEN)) != GENHD_FL_UP)
> > + return false;
> > + pr_info("%s: detected capacity change from %lld to %lld\n",
> > + disk->disk_name, si
On Thu 26-11-20 18:52:08, Christoph Hellwig wrote:
> On Thu, Nov 26, 2020 at 05:50:36PM +0100, Jan Kara wrote:
> > > + if (size == capacity ||
> > > + (disk->flags & (GENHD_FL_UP | GENHD_FL_HIDDEN)) != GENHD_FL_UP)
> > > + return false;
> > > + pr_info("%s: detected capacity change from
On Thu, Nov 26, 2020 at 07:04:08PM +0100, Jan Kara wrote:
> On Thu 26-11-20 18:52:08, Christoph Hellwig wrote:
> > On Thu, Nov 26, 2020 at 05:50:36PM +0100, Jan Kara wrote:
> > > > + if (size == capacity ||
> > > > + (disk->flags & (GENHD_FL_UP | GENHD_FL_HIDDEN)) !=
> > > > GENHD_