Re: [PATCH 2/2] jffs2: Provide jffs2_sync files to track gc POLL progress

2018-07-22 Thread Theuns Verwoerd
On 07/23/2018 01:17 AM, Richard Weinberger wrote: > Beside of that, IMHO this debugfs file is a gross hack. > Did you look into the possibility to add the GC phase into the unlink code? I'm not terribly keen on it either, but it's the least bad option I could think of.  The main issue is that

Re: [PATCH 2/2] jffs2: Provide jffs2_sync files to track gc POLL progress

2018-07-22 Thread Theuns Verwoerd
On 07/23/2018 01:17 AM, Richard Weinberger wrote: > Beside of that, IMHO this debugfs file is a gross hack. > Did you look into the possibility to add the GC phase into the unlink code? I'm not terribly keen on it either, but it's the least bad option I could think of.  The main issue is that

Re: [PATCH 2/2] jffs2: Provide jffs2_sync files to track gc POLL progress

2018-07-22 Thread Al Viro
On Sun, Jul 22, 2018 at 03:17:07PM +0200, Richard Weinberger wrote: > On Fri, Jul 20, 2018 at 2:54 AM, Theuns Verwoerd > wrote: > > > > On 07/20/2018 12:04 PM, Al Viro wrote: > >> On Fri, Jul 20, 2018 at 11:50:12AM +1200, Theuns Verwoerd wrote: > >> > >>> +ssize_t jffs2_sync_file_read(struct

Re: [PATCH 2/2] jffs2: Provide jffs2_sync files to track gc POLL progress

2018-07-22 Thread Al Viro
On Sun, Jul 22, 2018 at 03:17:07PM +0200, Richard Weinberger wrote: > On Fri, Jul 20, 2018 at 2:54 AM, Theuns Verwoerd > wrote: > > > > On 07/20/2018 12:04 PM, Al Viro wrote: > >> On Fri, Jul 20, 2018 at 11:50:12AM +1200, Theuns Verwoerd wrote: > >> > >>> +ssize_t jffs2_sync_file_read(struct

Re: [PATCH 2/2] jffs2: Provide jffs2_sync files to track gc POLL progress

2018-07-22 Thread Richard Weinberger
[fixing CC list] On Fri, Jul 20, 2018 at 2:54 AM, Theuns Verwoerd wrote: > > On 07/20/2018 12:04 PM, Al Viro wrote: >> On Fri, Jul 20, 2018 at 11:50:12AM +1200, Theuns Verwoerd wrote: >> >>> +ssize_t jffs2_sync_file_read(struct file *f, >>> + char __user *b, size_t len, loff_t *ofs) >>>

Re: [PATCH 2/2] jffs2: Provide jffs2_sync files to track gc POLL progress

2018-07-22 Thread Richard Weinberger
[fixing CC list] On Fri, Jul 20, 2018 at 2:54 AM, Theuns Verwoerd wrote: > > On 07/20/2018 12:04 PM, Al Viro wrote: >> On Fri, Jul 20, 2018 at 11:50:12AM +1200, Theuns Verwoerd wrote: >> >>> +ssize_t jffs2_sync_file_read(struct file *f, >>> + char __user *b, size_t len, loff_t *ofs) >>>

Re: [PATCH 2/2] jffs2: Provide jffs2_sync files to track gc POLL progress

2018-07-19 Thread Al Viro
On Fri, Jul 20, 2018 at 11:50:12AM +1200, Theuns Verwoerd wrote: > +ssize_t jffs2_sync_file_read(struct file *f, > + char __user *b, size_t len, loff_t *ofs) > +{ > + struct jffs2_sb_info *c = file_inode(f)->i_private; > + > + while (c->tidemark) > + schedule(); > +

Re: [PATCH 2/2] jffs2: Provide jffs2_sync files to track gc POLL progress

2018-07-19 Thread Al Viro
On Fri, Jul 20, 2018 at 11:50:12AM +1200, Theuns Verwoerd wrote: > +ssize_t jffs2_sync_file_read(struct file *f, > + char __user *b, size_t len, loff_t *ofs) > +{ > + struct jffs2_sb_info *c = file_inode(f)->i_private; > + > + while (c->tidemark) > + schedule(); > +

[PATCH 2/2] jffs2: Provide jffs2_sync files to track gc POLL progress

2018-07-19 Thread Theuns Verwoerd
When executing secure deletion under JFFS2 via the -POLL forced cleanup option, userspace may need to know when the process has safely completed. Provide debugfs files per mount that, when read, blocks while cleanup is in progress: once the read completes it is safe to assume that all obsoleted

[PATCH 2/2] jffs2: Provide jffs2_sync files to track gc POLL progress

2018-07-19 Thread Theuns Verwoerd
When executing secure deletion under JFFS2 via the -POLL forced cleanup option, userspace may need to know when the process has safely completed. Provide debugfs files per mount that, when read, blocks while cleanup is in progress: once the read completes it is safe to assume that all obsoleted