Re: [PATCH v2] exfat: check disk status during buffer write
From: dongliang cui
Date: Fri Jul 26 2024 - 02:18:30 EST
On Thu, Jul 25, 2024 at 2:00 PM Sungjong Seo <sj1557.seo@xxxxxxxxxxx> wrote:
>
> > > +static int exfat_block_device_ejected(struct super_block *sb)
> > > +{
> > > + struct backing_dev_info *bdi = sb->s_bdi;
> > > +
> > > + return bdi->dev == NULL;
> > > +}
> >
> > NAK, file systems have no business looking at this. What you probably
> > really want is to implement the ->shutdown method for exfat so it gets
> > called on device removal.
>
> Oh! Thank you for your additional comments. I completely missed this part.
> I agree with what you said. Implementing ->shutdown seems to be the
> right decision.
>
Thank you for your suggestions. I'll test it out this way.