Re: Can ovl_drop_write() be called earlier in ovl_dentry_open()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Miklos Szeredi <miklos@xxxxxxxxxx> wrote:

> >> Hmm,  that could result in a race where remount r/o of upper fs comes
> >> in between copy-up and vfs_open() so copy-up succeeds but the actual
> >> open fails.  It's harmless, though, and not  very likely.  So I guess
> >> your patch is OK.
> >
> > That race is there anyway if there's no copy up, right?
> 
> No.  The race I'm talking about is that with your patch it's possible
> that the file will be copied up, but open will return -EROFS.

Ah, I see what you're getting at.

> Without your patch, that is not possible since holding write counter
> for the mnt over both the copy-up and the open ensures that the
> filesystem cannot become read-only in the middle.
> 
> So your patch changes behavior, but the new behavior is acceptable,
> because there's no major change in semantics (it should only be
> detectable by the increased disk usage in the rare case of the failed
> open).

Okay.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux