hfsplus: return ENODATA when no xattr is found
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hin-Tak Leung
NAK--------------------------------------------
Quoted 9 lines · Ernesto A. Fernández
There are several points in the code where ENOENT or EOPNOTSUPP are
used to signal that an extended attribute does not exist. This is
clearly noticeable from the odd error messages shown by setfattr and
getfattr. Use ENODATA instead.Signed-off-by Ernesto A. Fernández <[email protected]>
Nacked.
I think you perhaps mis-understood the code. Some (older) HFS+ file system does not have attribute records so it gives EOPNOTSUPP . It is not NODATA, but that you cannot write attribute data(or read) to such old fs. Likewise, the other changes from ENOENT to ENODATA seems wrong too. "Not found" is not "no data" ( = "found but null").
Quoted 12 lines · Hin-Tak Leung
--------------------------------------------
Quoted 7 lines · Ernesto A. Fernández
There are several points in the code where ENOENT or EOPNOTSUPP are
used to signal that an extended attribute does not exist. This is
clearly noticeable from the odd error messages shown by setfattr and
getfattr. Use ENODATA instead.
Quoted 6 lines
Quoted 1 line
Signed-off-by Ernesto A. Fernández <[email protected]>Nacked.
I think you perhaps mis-understood the code. Some (older) HFS+ file system does not have attribute records so it gives EOPNOTSUPP . It is not NODATA, but that you cannot write attribute data(or read) to such old fs. Likewise, the other changes from ENOENT to ENODATA seems wrong too. "Not found" is not "no data" ( = "found but null").
If you create a fresh hfsplus filesystem and run:
touch test
setfattr -x user.1 test
you will get an "operation not supported" error. That isn't right. Now if you run:
setfattr -n user.1 test
setfattr -x user.1 test
setfattr -x user.1 test
you will get a "no such file or directory" error. Also bad, the file is right there. This one is caused by the ENOENT.
Quoted 37 lines · Ernesto A. Fernández
Quoted 18 lines · Hin-Tak Leung
--------------------------------------------
Quoted 8 lines · Ernesto A. Fernández
There are several points in the code where ENOENT or EOPNOTSUPP are
used to signal that an extended attribute does not exist. This is
clearly noticeable from the odd error messages shown by setfattr and
getfattr. Use ENODATA instead.Quoted 3 lines
Signed-off-by Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Quoted 9 lines
Nacked.
I think you perhaps mis-understood the code. Some (older) HFS+ file system does not have attribute records so it gives EOPNOTSUPP . It is not NODATA, but that you cannot write attribute data(or read) to such old fs. Likewise, the other changes from ENOENT to ENODATA seems wrong too. "Not found" is not "no data" ( = "found but null").
If you create a fresh hfsplus filesystem and run:
touch test
setfattr -x user.1 testyou will get an "operation not supported" error. That isn't right. Now
if you run:
Quoted 7 lines
setfattr -n user.1 test
setfattr -x user.1 test
setfattr -x user.1 testyou will get a "no such file or directory" error. Also bad, the file is
right there. This one is caused by the ENOENT.
You suggested to exclude all this code (xattr support) from the HFS+ file system driver. What is the point to review your patches for the code that will be deleted? If this code will be deleted then no troubles anymore. Forget and relax.
Regards,
Vyacheslav Dubeyko.
Quoted 47 lines · Viacheslav Dubeyko
Quoted 37 lines · Ernesto A. Fernández
Quoted 18 lines · Hin-Tak Leung
--------------------------------------------
Quoted 8 lines · Ernesto A. Fernández
There are several points in the code where ENOENT or EOPNOTSUPP are
used to signal that an extended attribute does not exist. This is
clearly noticeable from the odd error messages shown by setfattr and
getfattr. Use ENODATA instead.Quoted 3 lines
Signed-off-by Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Quoted 9 lines
Nacked.
I think you perhaps mis-understood the code. Some (older) HFS+ file system does not have attribute records so it gives EOPNOTSUPP . It is not NODATA, but that you cannot write attribute data(or read) to such old fs. Likewise, the other changes from ENOENT to ENODATA seems wrong too. "Not found" is not "no data" ( = "found but null").
If you create a fresh hfsplus filesystem and run:
touch test
setfattr -x user.1 testyou will get an "operation not supported" error. That isn't right. Now
if you run:Quoted 7 lines
setfattr -n user.1 test
setfattr -x user.1 test
setfattr -x user.1 testyou will get a "no such file or directory" error. Also bad, the file is
right there. This one is caused by the ENOENT.
Quoted 4 lines
You suggested to exclude all this code (xattr support) from the HFS+ file system driver. What is the point to review your patches for the code that will be deleted? If this code will be deleted then no troubles anymore. Forget and relax.
I never suggested anything like that. I'm guessing your confusion is because of the patch I sent to drop ACL support, but I never spoke of xattrs.
And you seem to believe it was my idea, but it wasn't. I only wrote the patch because I was the one who first noticed it was broken a couple of months ago.
Ernest
Quoted 5 lines
Regards,
Vyacheslav Dubeyko.