After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 738471 - ReFS file system is not recognised
ReFS file system is not recognised
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
GIT HEAD
Other Linux
: Normal enhancement
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2014-10-13 16:53 UTC by Mike Fleetwood
Modified: 2015-01-26 18:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Recognise ReFS file system (v1) (16.54 KB, patch)
2014-10-13 22:11 UTC, Mike Fleetwood
none Details | Review
GParted "Ranibow" partition screen shot (#1) (237.23 KB, image/png)
2014-10-29 22:19 UTC, Mike Fleetwood
  Details

Description Mike Fleetwood 2014-10-13 16:53:00 UTC
GParted forum: Feature Requests > ReFS
http://gparted-forum.surf4.info/viewtopic.php?id=17256
Comment 1 Mike Fleetwood 2014-10-13 22:11:04 UTC
Created attachment 288427 [details] [review]
Recognise ReFS file system (v1)

Hi Curtis,

Here's the patches for this.  Also did a bit of tidying up too.

I don't actually have anyway to create an ReFS file system.  Looked at
the source [1] to see what blkid does to recognise ReFS file systems.
Just faked it with this:

# awk 'END{printf "\0\0\0ReFS\0"}' /dev/null > /dev/sdb1
# blkid /dev/sdb1
/dev/sdb1: TYPE="ReFS" PARTUUID="327c624b-01"

Tested of Fedora Rawhide (22), but any distro with util-linux >= 2.24
will work.  Made the colour similar to, but distinct from NTFS.  This is
for after GParted 0.20.0 release.

Thanks,
Mike

[1] util-linux v2.24, liblkbid, refs.c
http://git.kernel.org/cgit/utils/util-linux/util-linux.git/tree/libblkid/src/superblocks/refs.c?id=v2.24
Comment 2 Curtis Gedak 2014-10-27 21:10:04 UTC
Hi Mike,

Thank you for this patch set.  I really like the way you cleaned up the code so that it should be easier to add "detection-only" file systems in the future.  :-)

With fedora 20, I used your test steps with success:

# awk 'END{printf "\0\0\0ReFS\0"}' /dev/null > /dev/sdb4
# blkid /dev/sdb4
/dev/sdb4: TYPE="ReFS" PARTUUID="603aac13-d33c-4ceb-8289-3cd1d2490140" 
# rpm -qa util-linux
util-linux-2.24.2-1.fc20.i686
#

However, for some reason on Ubuntu 14.10 (Utopic Unicorn) the blkid command fails to recognize ReFS:

# awk 'END{printf "\0\0\0ReFS\0"}' /dev/null > /dev/sdb4
# blkid /dev/sdb4
/dev/sdb4: PARTUUID="dfdbb4fb-4b14-4faf-a78f-41090392a07a" 
# dpkg -l | grep util-linux
ii  util-linux                                          2.25.1-3ubuntu4                            i386         Miscellaneous system utilities
#

This is a newer version of utils-linux (which contains blkid IIRC).  I wonder if there was a regression in utils-linux, or perhaps the Ubuntu package somehow breaks ReFS detection?


On the topic of colour, the ReFS colour looks almost identical to the NTFS colour on my monitor.  Would you be able to make the difference more noticeable?  Perhaps darker?

Thanks,
Curtis
Comment 3 Mike Fleetwood 2014-10-28 22:30:55 UTC
Hi Curtis,


Ubuntu 14.10 failing to recognise ReFS:

It's the awk command that doesn't generate the signature on
Ubuntu 14.10.

# awk 'END{printf "\0\0\0ReFS\0"}' /dev/null | hexdump -C
[No output from hexdump]

I used this instead to generate the signature and blkid recognises it.

# python -c '
import sys
sys.stdout.write("\0\0\0ReFS\0")
' > /dev/sdb1
# blkid /dev/sdb1
/dev/sdb1: TYPE="ReFS" PARTUUID="000c18d8-01"


Will think about the colour in a bit.


Thanks,
Mike
Comment 4 Curtis Gedak 2014-10-29 21:16:21 UTC
Hi Mike,

Thanks for determining that writing the signature wasn't working.

With the python snippet I was able to write the ReFS code and confirm in Ubuntu 14.10 that blkid did indeed recognize the ReFS file system.

# python -c '
> import sys
> sys.stdout.write("\0\0\0ReFS\0")
> ' > /dev/sdb4
# blkid /dev/sdb4
/dev/sdb4: TYPE="ReFS" PARTUUID="dfdbb4fb-4b14-4faf-a78f-41090392a07a" 
# 

Interestingly, with the GParted patch applied and running under ubuntu14.10, the ReFS partition is not recognized and is shown as UNKNOWN on my VM.  I'm using a GPT partition table, but that shouldn't make any difference.  This has me baffled at the moment.

Curtis
Comment 5 Mike Fleetwood 2014-10-29 22:19:07 UTC
Created attachment 289614 [details]
GParted "Ranibow" partition screen shot (#1)

Hi Curtis,

Colour of ReFS:

Can you have a look at the attached "rainbow" shot of partitions in
GParted.  The blues (ext*), purples (reiser* & encrypted) and reds
(swap, suspend) are all taken from the GNOME palette.  The greens (fat)
and aquamarines (ntfs, refs) aren't.

I think that the difference between aquamarines (ntfs to refs) is more
significant than between most of the blue and purple shades from the
GNOME palette.

Do you want me to still change the colour for refs?

Thanks,
Mike
Comment 6 Curtis Gedak 2014-10-29 22:31:07 UTC
Hi Mike,

Thanks for taking the time to place all of the file system colours side-by-side.  Now that I see them all together, I agree with your original colour choice.  Also for whatever reason, today I can better see the difference in colour.  Perhaps the lighting in my office is different today, or my eyes can see better.

Also, I re-tested ReFS recognition in GParted on my Ubuntu 14.10 VM again and this time it works.  I don't understand why the difference.  Perhaps I'm having an off day.  I will wait until tomorrow, retest, and then if all goes well I'll commit these patches.

Thanks for your perseverance,
Curtis
Comment 7 Curtis Gedak 2014-10-30 16:07:49 UTC
My retesting of the patch set in comment #1 has gone well.  No problems were encountered, the ReFS signature was recognized, and the code changes are good improvements from my perspective and will make adding recognition for other file systems easier.

The patch set from comment #1 has been committed to the git repository for inclusion in the next release of GParted.

The relevant git commits can be viewed at the following links:

Pass by value to get_filesystem_object()
https://git.gnome.org/browse/gparted/commit/?id=e3a1b93a6df9f52a69f31d5b962d16e0b4c1189a

Comment and re-order FILESYSTEM enumeration type
https://git.gnome.org/browse/gparted/commit/?id=58618572b59f94a8892502af72bdb43097e9e16a

Add supported_filesystem() predicate method (#738471)
https://git.gnome.org/browse/gparted/commit/?id=8b4b73a8f3d26f201453c2182f22ab9b0344d67a

Use supported_filesystem() predicate (#738471)
https://git.gnome.org/browse/gparted/commit/?id=88f67058e8aeb647914655833cec9f1fbafbb714

Recognise ReFS file system (#738471)
https://git.gnome.org/browse/gparted/commit/?id=3373ef07fa33d2840fb0ed8e8d7edd45f17e61cd

Rework population of the create new partition file system list
https://git.gnome.org/browse/gparted/commit/?id=6220a35dacf1d38606f1d62a63e811198272f9f5
Comment 8 Curtis Gedak 2015-01-26 18:25:59 UTC
This enhancement was included in the GParted 0.21.0 release on January 26, 2015.