vi, multiple users
There still is a problem with vi and multiple users. E.g., the following scenario fails:
client1: cd /mnt; cp ~/foo .
client2: head foo
client1: vi foo; <change something, write, exit>
client2: head foo
now foo appears to be corrupted.
I guess it is likely that is still related to the truncation reporting that was found yesterday, I'll try to verify that.
Yehuda
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ceph-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ceph-devel
Quoted 8 lines · Yehuda Sadeh Weinraub
There still is a problem with vi and multiple users. E.g., the following scenario fails:
client1: cd /mnt; cp ~/foo .
client2: head foo
client1: vi foo; <change something, write, exit>
client2: head foo
Quoted 4 lines
now foo appears to be corrupted.
I guess it is likely that is still related to the truncation reporting that was found yesterday, I'll try to verify that.
BTW the corruption I was seeing was that the second page was written to the first page (or something very close to that, possibly shifted by a byte?).
sage
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
Quoted 5 lines · Sage Weil
BTW the corruption I was seeing was that the second page was written to the first page (or something very close to that, possibly shifted by a byte?).
I see the last page being written over the first one, also shifted by one byte. The rest of the pages are just garbage. Could be just a bug in the sync write related functions, wasn't able to isolate it yet.
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ceph-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ceph-devel
Quoted 5 lines · Yehuda Sadeh Weinraub
Quoted 1 line · Sage Weil
Quoted 9 lines
Quoted 4 lines
BTW the corruption I was seeing was that the second page was written to the first page (or something very close to that, possibly shifted by a byte?).
I see the last page being written over the first one, also shifted by one byte. The rest of the pages are just garbage. Could be just a bug in the sync write related functions, wasn't able to isolate it yet.
Yes, the problem was in the copy_user_to_page_vector() helper function, which was broken for the case where more than one page is involved. This has only affected us in the synchronous write case, so it only happened with multiple users. Just pushed a fix.
There is another issue I'm not sure about, which we should look at when we audit the truncation code, and is whether we also need to update the truncation size in the sync_write case, e.g., something along the line of:
fs/ceph/file.c +0 -0
@@ -631,6 +631,10 @@ static ssize_t ceph_sync_write(struct file *file, const
char __user *data,
*/
more:
len = left;+
+ if (ci->i_truncate_size < pos + len)
+ ci->i_truncate_size = pos + len;
+
req = ceph_osdc_new_request(&client->osdc, &ci->i_layout,
ceph_vino(inode), pos, &len, CEPH_OSD_OP_WRITE, flags,
Yehuda
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ceph-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ceph-devel