Bug 1294955 - set-label fails to set some unicode characters as the NTFS filesystem label
Summary: set-label fails to set some unicode characters as the NTFS filesystem label
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs-winsupport
Version: 6.8
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1301844
TreeView+ depends on / blocked
 
Reported: 2015-12-31 09:32 UTC by Hu Zhang
Modified: 2016-11-08 16:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-08 16:50:52 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Hu Zhang 2015-12-31 09:32:41 UTC
Description of problem:
set-label fails to set some unicode characters as the NTFS filesystem label. This works well on rhel7.2

Version-Release number of selected component (if applicable):
libguestfs-1.20.11-16.el6.x86_64
libguestfs-winsupport-1.0-7.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. # guestfish -a test.raw
><fs> list-filesystems
/dev/sda1: ntfs

2. Set the label as "水"
><fs> set-label /dev/sda1 "水"
><fs>

3. Get the label
><fs> vfs-label /dev/sda1

><fs>


Actual results:
In step 3, nothing returned.

Expected results:
In step 2, the label should be set successfully.
In step 3, the character "水" should be returned.


Additional info:

Comment 1 Richard W.M. Jones 2016-01-04 15:31:42 UTC
One line reproducer:

guestfish -N fs:ntfs set-label /dev/sda1 水 : vfs-label /dev/sda1

Upstream: works OK

RHEL 7.2: works OK

RHEL 6.8: fails as described in the bug

I'm inclined to say this is a real bug, but one which we're not
really interested in fixing in RHEL 6.  However I'll leave it up
to Pino to comment.

Comment 2 Pino Toscano 2016-01-15 17:54:21 UTC
This seems due to the different ntfsprogs version available in libguestfs-winsupport:

libguestfs: trace: set_label "/dev/sda1" "\xe6\xb0\xb4"
libguestfs: send_to_daemon: 68 bytes: 00 00 00 40 | 20 00 f5 f5 | 00 00 00 04 | 00 00 01 36 | 00 00 00 00 | ...
guestfsd: main_loop: proc 278 (mkfs) took 0.14 seconds
guestfsd: main_loop: new request, len 0x40
blkid -c /dev/null -o value -s TYPE /dev/sda1
ntfslabel /dev/sda1 \xe6\xb0\xb4
Unable to convert label string to Unicode: Invalid or incomplete multibyte or wide character.
libguestfs: recv_from_daemon: 40 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 01 36 | 00 00 00 01 | 00 12 34 02 | ...
libguestfs: trace: set_label = 0

Versions available:
- RHEL 6: ntfslabel v2.0.0 (libntfs 10:0:0)
- RHEL 7: ntfslabel v2015.3.14 (libntfs-3g)

Comment 4 Pino Toscano 2016-11-08 16:50:52 UTC
Moving to libguestfs-winsupport, which is the package providing the support for NTFS filesystem.

Also, closing this bug as WONTFIX, since:
- it is not a regression, but simply a bug in the old libntfs
- it is not a problem in libguestfs-winsupport for RHEL 7, since libntfs-3g there is more recent and supports this case better
- it is a corner case, usually ASCII characters are used for labels of filesystems


Note You need to log in before you can comment on or make changes to this bug.