Extend by mkfs for XFS filesystem

Change-Id: I3a6a8fc227cb9abd785b342584038e34d57a4175
diff --git a/README.rst b/README.rst
index ca6d005..9e1692b 100644
--- a/README.rst
+++ b/README.rst
@@ -1284,7 +1284,8 @@
                 - size: 200 #size in MB
                   type: fat32
                 - size: 300 #size in MB
-                  type: ext4
+                  mkfs: True
+                  type: xfs
             /dev/vda1:
               partitions:
                 - size: 5
diff --git a/linux/storage/disk.sls b/linux/storage/disk.sls
index c200258..92510ce 100644
--- a/linux/storage/disk.sls
+++ b/linux/storage/disk.sls
@@ -32,6 +32,22 @@
   - require:
     - module: create_disk_label
 
+{%- if partition.get('mkfs') %}
+
+{%- if partition.type == "xfs" %}
+
+mkfs_partition_{{ disk_name }}_{{ loop.index }}:
+  module.run:
+  - name: xfs.mkfs
+  - device: {{ disk_name }}{{ loop.index }}
+  - unless: "blkid {{ disk_name }}{{ loop.index }} {{ disk_name }}p{{ loop.index }} | grep xfs"
+  - require:
+    - module: create_partition_{{ disk_name }}_{{ loop.index }}
+
+{%- endif %}
+
+{%- endif %}
+
 {% set end_size = end_size + partition.size -%}
 
 {%- endfor %}