Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-06-19 Thread Namjae Jeon
2013/6/19, OGAWA Hirofumi : > Namjae Jeon writes: > >>>If above is correct, right implement to change get_block(). >> Now when we try to write in the fallocated region ( with keep size) in >> the fat_write_begin when it is called first time it checks that the >> mismatch is present between the mmu

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-06-18 Thread OGAWA Hirofumi
Namjae Jeon writes: >>If above is correct, right implement to change get_block(). > Now when we try to write in the fallocated region ( with keep size) in > the fat_write_begin when it is called first time it checks that the > mismatch is present between the mmu_private and mmu_actual , and hence

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-06-17 Thread Namjae Jeon
Hi, OGAWA. We checked several cases with respect to your questions. But we cannot find any issue. Also, We compare the results with Ext4. It is same. >cluster size == 512b >1) create new file >2) fallocate 100MB >3) write(2) data for each 512b >With this, write_begin() will be called for each 51

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-05-02 Thread Namjae Jeon
2013/5/2, OGAWA Hirofumi : > Namjae Jeon writes: > AFAIK, preallocation != fallocate. ext*'s preallocation was there at before fallocation to optimize block allocation for user data blocks. >> yes, this is correct , preallocation!= fallocate, we just adopted only >> the "release part" fr

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-05-02 Thread OGAWA Hirofumi
Namjae Jeon writes: >>> AFAIK, preallocation != fallocate. ext*'s preallocation was there at >>> before fallocation to optimize block allocation for user data blocks. > yes, this is correct , preallocation!= fallocate, we just adopted only > the "release part" from that approach > Sorry, Would yo

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-05-02 Thread Namjae Jeon
2013/5/2, OGAWA Hirofumi : > OGAWA Hirofumi writes: > >> Namjae Jeon writes: >> Then, per-file discard fallocate space sounds like wrong. fallocate space probably is inode attribute. >>> Since, our preallocation will not be persistent after umount. So, we >>> need to free up the space a

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-05-02 Thread OGAWA Hirofumi
OGAWA Hirofumi writes: > Namjae Jeon writes: > >>> Then, per-file discard fallocate space sounds like wrong. fallocate >>> space probably is inode attribute. >> Since, our preallocation will not be persistent after umount. So, we >> need to free up the space at some point. >> If we consider for

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-05-02 Thread OGAWA Hirofumi
Namjae Jeon writes: >> Then, per-file discard fallocate space sounds like wrong. fallocate >> space probably is inode attribute. > Since, our preallocation will not be persistent after umount. So, we > need to free up the space at some point. > If we consider for normal pre-allocation in ext4, in

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-05-01 Thread Namjae Jeon
2013/5/2, OGAWA Hirofumi : > Namjae Jeon writes: > > Hm, why d_count == 1 check is needed? Feel strange and racy. Since, fat_file_release() is called on every close for the file. >>> >>> What is wrong? IIRC, it is what you choose (i.e. for each last close for >>> the file descriptor). >>

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-05-01 Thread OGAWA Hirofumi
Namjae Jeon writes: Hm, why d_count == 1 check is needed? Feel strange and racy. >>> Since, fat_file_release() is called on every close for the file. >> >> What is wrong? IIRC, it is what you choose (i.e. for each last close for >> the file descriptor). > Yes, this is what we had chosen afte

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-05-01 Thread Namjae Jeon
2013/5/1, OGAWA Hirofumi : > Namjae Jeon writes: > >> Hi OGAWA. > > Hi, > >>> I couldn't review fully though. >>> + if (mmu_private_ideal < MSDOS_I(inode)->mmu_private && + filp->f_dentry->d_count == 1) + fat_truncate_blocks(inode, inode->i_size); >>> >>> Hm, why d_co

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-04-30 Thread OGAWA Hirofumi
Namjae Jeon writes: > Hi OGAWA. Hi, >> I couldn't review fully though. >> >>> + if (mmu_private_ideal < MSDOS_I(inode)->mmu_private && >>> + filp->f_dentry->d_count == 1) >>> + fat_truncate_blocks(inode, inode->i_size); >> >> Hm, why d_count == 1 check is needed? Feel strange

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-04-30 Thread Namjae Jeon
2013/4/29, OGAWA Hirofumi : > Namjae Jeon writes: > Hi OGAWA. > I couldn't review fully though. > >> +if (mmu_private_ideal < MSDOS_I(inode)->mmu_private && >> +filp->f_dentry->d_count == 1) >> +fat_truncate_blocks(inode, inode->i_size); > > Hm, why d_count == 1 check is ne

Re: [PATCH RESEND v5] fat: editions to support fat_fallocate

2013-04-29 Thread OGAWA Hirofumi
Namjae Jeon writes: I couldn't review fully though. > + if (mmu_private_ideal < MSDOS_I(inode)->mmu_private && > + filp->f_dentry->d_count == 1) > + fat_truncate_blocks(inode, inode->i_size); Hm, why d_count == 1 check is needed? Feel strange and racy. > + /

[PATCH RESEND v5] fat: editions to support fat_fallocate

2013-04-27 Thread Namjae Jeon
From: Namjae Jeon Implement preallocation via the fallocate syscall on VFAT partitions. Change Log: v5: change to avoid compilation warning: fs/fat/inode.c: In function 'fat_zero_falloc_area': >> fs/fat/inode.c:169:11: warning: comparison of distinct pointer types lacks a cast [enabled by defa