Re: [Tux3] [RFC] Refactor create_entry and find_entry to work with xattrs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Daniel Phillips <phillips@...>
Cc: <tux3@...>
Date: Friday, December 12, 2008 - 5:56 am

Daniel Phillips writes:

> We are likely to change this again after a while, but for now this

Yes, this would be work. Just FYI for people, probably you know though,
inode->i_size has race on 32bit arch. It is 64bit value, so,

*size += blocksize;

means something like the following. E.g.

load 0x0(size), %reg1
load 0x4(size), %reg2
add blocksize, %reg1
add-carry %reg2
store %reg1, 0x0(size)
<---- (W)
store %reg2, 0x4(size)

So, block I/O library like block_write_full_page() can read the size at
(W) point. The result may be bogus size.

We have to fix this later, maybe change with phtree. (don't read i_size
without lock, or use i_size_read()/i_size_write())

> @@ -139,7 +139,7 @@

> diff -r ad6aff100867 user/kernel/tux3.h

--
OGAWA Hirofumi

_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Tux3] Tux3 command interpreter, Daniel Phillips, (Mon Sep 1, 4:15 pm)
Re: [Tux3] [RFC] Refactor create_entry and find_entry to wor..., OGAWA Hirofumi, (Fri Dec 12, 5:56 am)