Re: [GSoC] Implement xattr Support Update

2016-08-24 Thread Richard Braun
On Fri, Aug 19, 2016 at 11:06:32AM +0800, Shengyu Zhang wrote:
> GSoC is coming to an end. It is time to report my work during this summer.

I've just completed the evaluation, everything is in order, and we'll
have more time in September to really dive into the code, finish the
review and merge it.

Congratulations :)

-- 
Richard Braun



[GSoC] Implement xattr Support Update

2016-08-18 Thread Shengyu Zhang

Hi all,

GSoC is coming to an end. It is time to report my work during this summer.

As I said in my proposal, my project has three goals:

- Implement xattr support for ext2fs
- Using xattr to store passive translator
- Port xattr tools to hurd

Now, the first two goals are achieved, I had sumitted two patches for them.
the left work is in progress, I will finish it after gsoc in spare time.

# Implement xattr support for ext2fs

After some discussion[1], we use namespace "gnu." to storing 
hurd-spceifed meta

message. (The anohter reason that doesn't mentioned in aboved discussion is
that: this namespace is already used in glibc[2])

The work about xattr support is based on Cascardo's previous patch[3].
Current ext2fs only supports two xattr namespaces: "user." and "gnu.",
It is no diffcult to add more namespaces, we only add what we need ;-P.

# Using xattr to store passive translator

After implement the xattr support, I modified `diskfs_set_translator' and
`diskfs_get_translator' (functions in ext2fs/inode.c) to add xattr support:

- When setting a passive translator, if xattr is supported on current 
filesystem,
  passive translator will be stored as a xattr value with name 
"gnu.translator".

  Otherwise, the "leagcy translator" will be created.
- When reading a passive translator, if "leagcy translator" was found, 
take it out.

  Otherwise, try to find xattr value with name "gnu.translator"

Note: Although xattr name&value can be created/modified on other system
(such as Linux), passive translator should only work on hurd-created
filesytem (it was discussed in #hurd[4]).

# Port xattr tools to hurd

Until now, libdiskfs & glibc interface has roughly finished.


My code hasn't been merged to upstream yet, you can check them in the 
following

repositories:

https://github.com/lastavenger/gsoc-2016
https://github.com/lastavenger/hurd
https://github.com/lastavenger/glibc

At last, Thank to all the people who gave me helps, especially my two 
mentors

braunr and teythoon :-).

[1] http://lists.gnu.org/archive/html/bug-hurd/2016-07/msg00014.html
[2] 
http://git.savannah.gnu.org/cgit/hurd/glibc.git/tree/hurd/xattr.c?h=baseline#n27

[3] https://savannah.gnu.org/patch/?5126
[4] http://richtlijn.be/~larstiq/hurd/hurd-2016-08-08

--
Best regards
Shengyu Zhang