On Wed, Apr 22, 2020 at 06:10:29PM +0200, Jan Kara wrote: > On Wed 15-04-20 22:23:52, Ira Weiny wrote: > > On Wed, Apr 15, 2020 at 06:07:52PM -0400, Theodore Y. Ts'o wrote: > > > On Wed, Apr 15, 2020 at 01:25:37PM -0700, Ira Weiny wrote: > > > > This fundamentally changes the behavior from forcing the dax mode to be the > > > > same across the remount to only failing if we are going from non-dax to dax, > > > > adding -o dax on the remount? > > > > > > > > But going from -o dax to 'not -o dax' would be ok? > > > > > > > > FWIW after thinking about it some I _think_ it would be ok to allow the dax > > > > mode to change on a remount and let the inodes in memory stay in the mode they > > > > are at. And newly loaded inodes would get the new mode... Unfortunately > > > > without the STATX patch I have proposed the user does not have any way of > > > > knowing which files are in which mode. > > > > > > We don't currently support mount -o nodax. > > > > But we do support not supplying the option which means 'nodax' right? > > Yeah, I second what Ira wrote. The new code does not seem to properly > detect a case when enabled mount option is removed for remount and thus the > feature would get disabled during remount as a result... Sorry for not responding earlier. The way ext4 remounting working is not supplying an mount option which toggles a switch means that we don't change its current setting. For example, if you mount with, say dioread_nolock, if you don't specify it when remounting, the current setting of dioread_nolock remains the same. If you want to change it, you need to specify the mount option nodioread_nolock. The change is true for discard vs nodiscard, etc. We currently don't have nodax at all, which means that once dax is set, there is no way to unset the dax mount option. This was deliberate, because I was aware that the dax->no dax transition would result in badness. Cheers, - Ted