RE: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-30 Thread Seiji Aguchi
> On Fri, 18 Oct, at 10:30:58PM, Seiji Aguchi wrote: > > The scanning and deleting logic is still needed. In case an entry(A) > > is found, the pointer is saved to psi->data. And efi_pstore_read() > > passes the entry(A) to a pstore filesystem by releasing > > __efivars->lock. > > > > And then,

Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-30 Thread Matt Fleming
On Fri, 18 Oct, at 10:30:58PM, Seiji Aguchi wrote: > The scanning and deleting logic is still needed. In case an entry(A) > is found, the pointer is saved to psi->data. And efi_pstore_read() > passes the entry(A) to a pstore filesystem by releasing > __efivars->lock. > > And then, the pstore

Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-30 Thread Matt Fleming
On Fri, 18 Oct, at 10:30:58PM, Seiji Aguchi wrote: The scanning and deleting logic is still needed. In case an entry(A) is found, the pointer is saved to psi-data. And efi_pstore_read() passes the entry(A) to a pstore filesystem by releasing __efivars-lock. And then, the pstore filesystem

RE: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-30 Thread Seiji Aguchi
On Fri, 18 Oct, at 10:30:58PM, Seiji Aguchi wrote: The scanning and deleting logic is still needed. In case an entry(A) is found, the pointer is saved to psi-data. And efi_pstore_read() passes the entry(A) to a pstore filesystem by releasing __efivars-lock. And then, the pstore

RE: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-18 Thread Seiji Aguchi
Matt, > It seems to me that because you're no longer dropping __efivars->lock > when reading from the EFI variable store, you actually don't need all > the ->scanning and ->deleting logic because anything that sets those > flags runs to completion while holding the lock. The scanning and

RE: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-18 Thread Seiji Aguchi
Matt, It seems to me that because you're no longer dropping __efivars-lock when reading from the EFI variable store, you actually don't need all the -scanning and -deleting logic because anything that sets those flags runs to completion while holding the lock. The scanning and deleting logic

RE: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-17 Thread Seiji Aguchi
Hi Madper, Thank you for assisting me. But, I need to discuss the implementation with Matt more. After the discussion, I will post v4 and ask you to test it. Please wait for a while. Seiji > -Original Message- > From: Madper Xie [mailto:c...@redhat.com] > Sent: Thursday, October 17,

Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-17 Thread Madper Xie
Hi folks, I tested it on my DELL XPS desktop. And it won't show any warnings when I mounting pstore and deleting pstore items after this patch applied. Tested-by: Madper Xie c...@redhat.com writes: > Oops, It seems my mu4e(a email client for emacs)'s auto-indent breaks the > patch...

Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-17 Thread Madper Xie
Oops, It seems my mu4e(a email client for emacs)'s auto-indent breaks the patch... I apologize for this... seiji.agu...@hds.com writes: > Hi Madper, > > I tested this patch on 3.12-rc4. > Could you please send me the log when you failed to apply? > > Seiji > >> -Original Message- >>

Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-17 Thread Matt Fleming
On Fri, 11 Oct, at 02:29:07PM, Seiji Aguchi wrote: > Change from v2: > - Move dynamic memory allocation to efi_pstore_read() before holding > efivars->lock to protect entry->var.Data. > - Access to entry->scanning while holding efivars->lock. > - Move a comment about a returned value from

RE: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-17 Thread Seiji Aguchi
Hi Madper, I tested this patch on 3.12-rc4. Could you please send me the log when you failed to apply? Seiji > -Original Message- > From: Madper Xie [mailto:c...@redhat.com] > Sent: Thursday, October 17, 2013 1:54 AM > To: Seiji Aguchi > Cc: linux-kernel@vger.kernel.org;

RE: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-17 Thread Seiji Aguchi
Hi Madper, I tested this patch on 3.12-rc4. Could you please send me the log when you failed to apply? Seiji -Original Message- From: Madper Xie [mailto:c...@redhat.com] Sent: Thursday, October 17, 2013 1:54 AM To: Seiji Aguchi Cc: linux-kernel@vger.kernel.org;

Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-17 Thread Matt Fleming
On Fri, 11 Oct, at 02:29:07PM, Seiji Aguchi wrote: Change from v2: - Move dynamic memory allocation to efi_pstore_read() before holding efivars-lock to protect entry-var.Data. - Access to entry-scanning while holding efivars-lock. - Move a comment about a returned value from

Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-17 Thread Madper Xie
Oops, It seems my mu4e(a email client for emacs)'s auto-indent breaks the patch... I apologize for this... seiji.agu...@hds.com writes: Hi Madper, I tested this patch on 3.12-rc4. Could you please send me the log when you failed to apply? Seiji -Original Message- From: Madper

Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-17 Thread Madper Xie
Hi folks, I tested it on my DELL XPS desktop. And it won't show any warnings when I mounting pstore and deleting pstore items after this patch applied. Tested-by: Madper Xie c...@redhat.com writes: Oops, It seems my mu4e(a email client for emacs)'s auto-indent breaks the patch... I

RE: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-17 Thread Seiji Aguchi
Hi Madper, Thank you for assisting me. But, I need to discuss the implementation with Matt more. After the discussion, I will post v4 and ask you to test it. Please wait for a while. Seiji -Original Message- From: Madper Xie [mailto:c...@redhat.com] Sent: Thursday, October 17, 2013

Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-16 Thread Madper Xie
Howdy Seiji, I failed appily this patch to both 3.12-rc2 and 3.12-rc4. Could you please let me know which is the right tree for this patch? Thanks, Madper. seiji.agu...@hds.com writes: > Change from v2: > - Move dynamic memory allocation to efi_pstore_read() before holding >

Re: [PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-16 Thread Madper Xie
Howdy Seiji, I failed appily this patch to both 3.12-rc2 and 3.12-rc4. Could you please let me know which is the right tree for this patch? Thanks, Madper. seiji.agu...@hds.com writes: Change from v2: - Move dynamic memory allocation to efi_pstore_read() before holding efivars-lock

[PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-11 Thread Seiji Aguchi
Change from v2: - Move dynamic memory allocation to efi_pstore_read() before holding efivars->lock to protect entry->var.Data. - Access to entry->scanning while holding efivars->lock. - Move a comment about a returned value from efi_pstore_read_func() to efi_pstore_read() because "size < 0"

[PATCH v3] efivars,efi-pstore: Hold off deletion of sysfs entry until, the scan is completed

2013-10-11 Thread Seiji Aguchi
Change from v2: - Move dynamic memory allocation to efi_pstore_read() before holding efivars-lock to protect entry-var.Data. - Access to entry-scanning while holding efivars-lock. - Move a comment about a returned value from efi_pstore_read_func() to efi_pstore_read() because size 0 case may