Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-27 Thread Pavel Machek
Hi! > > >> Previously, a read error would be ignored and we would eventually return > > >> NULL from ext4_find_entry, which signals "no such file or directory". We > > >> should be returning EIO. > > >> > > >> Signed-off-by: Khazhismel Kumykov > > > > > > Thanks, applied. >

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-27 Thread Pavel Machek
Hi! > > >> Previously, a read error would be ignored and we would eventually return > > >> NULL from ext4_find_entry, which signals "no such file or directory". We > > >> should be returning EIO. > > >> > > >> Signed-off-by: Khazhismel Kumykov > > > > > > Thanks, applied. > > > > I don't

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-26 Thread Andreas Dilger
> On Jun 26, 2017, at 1:22 PM, Tahsin Erdogan wrote: > > On Thu, Jun 22, 2017 at 4:23 PM, Khazhismel Kumykov wrote: >> - /* read error, skip block & hope for the best */ >>EXT4_ERROR_INODE(dir, "reading

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-26 Thread Andreas Dilger
> On Jun 26, 2017, at 1:22 PM, Tahsin Erdogan wrote: > > On Thu, Jun 22, 2017 at 4:23 PM, Khazhismel Kumykov wrote: >> - /* read error, skip block & hope for the best */ >>EXT4_ERROR_INODE(dir, "reading directory lblock %lu", >>

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-26 Thread Tahsin Erdogan
On Thu, Jun 22, 2017 at 4:23 PM, Khazhismel Kumykov wrote: > - /* read error, skip block & hope for the best */ > EXT4_ERROR_INODE(dir, "reading directory lblock %lu", > (unsigned long)

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-26 Thread Tahsin Erdogan
On Thu, Jun 22, 2017 at 4:23 PM, Khazhismel Kumykov wrote: > - /* read error, skip block & hope for the best */ > EXT4_ERROR_INODE(dir, "reading directory lblock %lu", > (unsigned long) block); >

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Theodore Ts'o
On Fri, Jun 23, 2017 at 05:34:23PM -0600, Andreas Dilger wrote: > > Sure, but that is a problem independent of the readdir case I think? This is lookup case not the readdir case > Wouldn't it just make sense to mount the filesystem with "errors=remount-ro" > or "errors=panic" in your case,

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Theodore Ts'o
On Fri, Jun 23, 2017 at 05:34:23PM -0600, Andreas Dilger wrote: > > Sure, but that is a problem independent of the readdir case I think? This is lookup case not the readdir case > Wouldn't it just make sense to mount the filesystem with "errors=remount-ro" > or "errors=panic" in your case,

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Andreas Dilger
On Jun 23, 2017, at 5:26 PM, Theodore Ts'o wrote: > > On Fri, Jun 23, 2017 at 03:33:46PM -0700, Khazhismel Kumykov wrote: >> >> Giving up early or checking future blocks both work, critical thing >> here is not returning NULL after seeing a read error. >> Previously to this the

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Andreas Dilger
On Jun 23, 2017, at 5:26 PM, Theodore Ts'o wrote: > > On Fri, Jun 23, 2017 at 03:33:46PM -0700, Khazhismel Kumykov wrote: >> >> Giving up early or checking future blocks both work, critical thing >> here is not returning NULL after seeing a read error. >> Previously to this the behavior was to

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Theodore Ts'o
On Fri, Jun 23, 2017 at 03:33:46PM -0700, Khazhismel Kumykov wrote: > > Giving up early or checking future blocks both work, critical thing > here is not returning NULL after seeing a read error. > Previously to this the behavior was to continue to check future blocks > after a read error, and it

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Theodore Ts'o
On Fri, Jun 23, 2017 at 03:33:46PM -0700, Khazhismel Kumykov wrote: > > Giving up early or checking future blocks both work, critical thing > here is not returning NULL after seeing a read error. > Previously to this the behavior was to continue to check future blocks > after a read error, and it

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Khazhismel Kumykov
On Fri, Jun 23, 2017 at 2:36 PM, Andreas Dilger wrote: > On Jun 23, 2017, at 6:26 AM, Theodore Ts'o wrote: >> >> The problem is that if we continue, successive reads may all take >> seconds or minutes to fail, thus tieing up the process for a long >> time. > >

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Khazhismel Kumykov
On Fri, Jun 23, 2017 at 2:36 PM, Andreas Dilger wrote: > On Jun 23, 2017, at 6:26 AM, Theodore Ts'o wrote: >> >> The problem is that if we continue, successive reads may all take >> seconds or minutes to fail, thus tieing up the process for a long >> time. > > Sorry, I don't understand where the

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Andreas Dilger
On Jun 23, 2017, at 6:26 AM, Theodore Ts'o wrote: > > On Fri, Jun 23, 2017 at 12:33:02AM -0600, Andreas Dilger wrote: >> On Jun 22, 2017, at 22:43, Theodore Ts'o wrote: >>> On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote: Previously, a

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Andreas Dilger
On Jun 23, 2017, at 6:26 AM, Theodore Ts'o wrote: > > On Fri, Jun 23, 2017 at 12:33:02AM -0600, Andreas Dilger wrote: >> On Jun 22, 2017, at 22:43, Theodore Ts'o wrote: >>> On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote: Previously, a read error would be ignored

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Theodore Ts'o
On Fri, Jun 23, 2017 at 12:33:02AM -0600, Andreas Dilger wrote: > On Jun 22, 2017, at 22:43, Theodore Ts'o wrote: > > > >> On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote: > >> Previously, a read error would be ignored and we would eventually return > >> NULL

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Theodore Ts'o
On Fri, Jun 23, 2017 at 12:33:02AM -0600, Andreas Dilger wrote: > On Jun 22, 2017, at 22:43, Theodore Ts'o wrote: > > > >> On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote: > >> Previously, a read error would be ignored and we would eventually return > >> NULL from

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Andreas Dilger
On Jun 22, 2017, at 22:43, Theodore Ts'o wrote: > >> On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote: >> Previously, a read error would be ignored and we would eventually return >> NULL from ext4_find_entry, which signals "no such file or directory". We >>

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-23 Thread Andreas Dilger
On Jun 22, 2017, at 22:43, Theodore Ts'o wrote: > >> On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote: >> Previously, a read error would be ignored and we would eventually return >> NULL from ext4_find_entry, which signals "no such file or directory". We >> should be returning

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-22 Thread Theodore Ts'o
On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote: > Previously, a read error would be ignored and we would eventually return > NULL from ext4_find_entry, which signals "no such file or directory". We > should be returning EIO. > > Signed-off-by: Khazhismel Kumykov

Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-22 Thread Theodore Ts'o
On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote: > Previously, a read error would be ignored and we would eventually return > NULL from ext4_find_entry, which signals "no such file or directory". We > should be returning EIO. > > Signed-off-by: Khazhismel Kumykov Thanks,

[PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-22 Thread Khazhismel Kumykov
Previously, a read error would be ignored and we would eventually return NULL from ext4_find_entry, which signals "no such file or directory". We should be returning EIO. Signed-off-by: Khazhismel Kumykov --- fs/ext4/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] ext4: Return EIO on read error in ext4_find_entry

2017-06-22 Thread Khazhismel Kumykov
Previously, a read error would be ignored and we would eventually return NULL from ext4_find_entry, which signals "no such file or directory". We should be returning EIO. Signed-off-by: Khazhismel Kumykov --- fs/ext4/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git