On Thu, Jun 13, 2013 at 1:46 PM, Brian Foster wrote:
> On 06/13/2013 04:16 AM, Maxim Patlasov wrote:
>> Changing size of a file on server and local update (fuse_write_update_size)
>> should be always protected by inode->i_mutex. Otherwise a race like this is
>> possible:
>>
>> 1. Process 'A'
On Thu, Jun 13, 2013 at 1:46 PM, Brian Foster bfos...@redhat.com wrote:
On 06/13/2013 04:16 AM, Maxim Patlasov wrote:
Changing size of a file on server and local update (fuse_write_update_size)
should be always protected by inode-i_mutex. Otherwise a race like this is
possible:
1. Process
On 06/13/2013 04:16 AM, Maxim Patlasov wrote:
> Changing size of a file on server and local update (fuse_write_update_size)
> should be always protected by inode->i_mutex. Otherwise a race like this is
> possible:
>
> 1. Process 'A' calls fallocate(2) to extend file (~FALLOC_FL_KEEP_SIZE).
>
Anand, Brian,
06/12/2013 11:04 PM, Anand Avati пишет:
On 6/11/13 3:59 AM, Maxim Patlasov wrote:
-if (mode & FALLOC_FL_PUNCH_HOLE) {
+if (lock_inode)
mutex_lock(>i_mutex);
+if (mode & FALLOC_FL_PUNCH_HOLE)
fuse_set_nowrite(inode);
-}
Just for clarity,
Anand, Brian,
06/12/2013 11:04 PM, Anand Avati пишет:
On 6/11/13 3:59 AM, Maxim Patlasov wrote:
-if (mode FALLOC_FL_PUNCH_HOLE) {
+if (lock_inode)
mutex_lock(inode-i_mutex);
+if (mode FALLOC_FL_PUNCH_HOLE)
fuse_set_nowrite(inode);
-}
Just for
On 06/13/2013 04:16 AM, Maxim Patlasov wrote:
Changing size of a file on server and local update (fuse_write_update_size)
should be always protected by inode-i_mutex. Otherwise a race like this is
possible:
1. Process 'A' calls fallocate(2) to extend file (~FALLOC_FL_KEEP_SIZE).
On 6/11/13 3:59 AM, Maxim Patlasov wrote:
- if (mode & FALLOC_FL_PUNCH_HOLE) {
+ if (lock_inode)
mutex_lock(>i_mutex);
+ if (mode & FALLOC_FL_PUNCH_HOLE)
fuse_set_nowrite(inode);
- }
Just for clarity, can you make the condition to
On 6/12/13 4:40 AM, Brian Foster wrote:
On 06/11/2013 06:59 AM, Maxim Patlasov wrote:
Changing size of a file on server and local update (fuse_write_update_size)
should be always protected by inode->i_mutex. Otherwise a race like this is
possible:
1. Process 'A' calls fallocate(2) to extend
On 06/11/2013 06:59 AM, Maxim Patlasov wrote:
> Changing size of a file on server and local update (fuse_write_update_size)
> should be always protected by inode->i_mutex. Otherwise a race like this is
> possible:
>
> 1. Process 'A' calls fallocate(2) to extend file (~FALLOC_FL_KEEP_SIZE).
>
On 06/11/2013 06:59 AM, Maxim Patlasov wrote:
Changing size of a file on server and local update (fuse_write_update_size)
should be always protected by inode-i_mutex. Otherwise a race like this is
possible:
1. Process 'A' calls fallocate(2) to extend file (~FALLOC_FL_KEEP_SIZE).
On 6/12/13 4:40 AM, Brian Foster wrote:
On 06/11/2013 06:59 AM, Maxim Patlasov wrote:
Changing size of a file on server and local update (fuse_write_update_size)
should be always protected by inode-i_mutex. Otherwise a race like this is
possible:
1. Process 'A' calls fallocate(2) to extend
On 6/11/13 3:59 AM, Maxim Patlasov wrote:
- if (mode FALLOC_FL_PUNCH_HOLE) {
+ if (lock_inode)
mutex_lock(inode-i_mutex);
+ if (mode FALLOC_FL_PUNCH_HOLE)
fuse_set_nowrite(inode);
- }
Just for clarity, can you make the condition to
12 matches
Mail list logo