[blivet:master 19/21] Don't notify the kernel if it was tmpfs filesystem that was resized.

David Lehman dlehman at redhat.com
Tue Jan 20 18:29:52 UTC 2015


On 01/15/2015 12:39 PM, mulhern wrote:
> The kernel should notice a resize of a tmpfs filesystem, since that type
> of filesystem resides in the kernel's memory.
>
> And, our current method of notifying the kernel will result in an
> exception being raised in the case of tmpfs.
>
> Signed-off-by: mulhern <amulhern at redhat.com>
> ---
>   blivet/formats/fs.py | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
> index 9effed6..dc4d8a9 100644
> --- a/blivet/formats/fs.py
> +++ b/blivet/formats/fs.py
> @@ -519,7 +519,8 @@ class FS(DeviceFormat):
>
>           # XXX must be a smarter way to do this
>           self._size = self.targetSize
> -        self.notifyKernel()
> +        if not self.device == "tmpfs":

if self.device != "tmpfs" reads better.

> +            self.notifyKernel()
>
>       def _getCheckArgs(self):
>           argv = []
>



More information about the anaconda-patches mailing list