Re: [PATCH 09/19] XFS: ensure xfs_file_*_read cannot deadlock in memory allocation.

2014-04-15 Thread Dave Chinner
On Wed, Apr 16, 2014 at 04:04:59PM +1000, Dave Chinner wrote: > On Wed, Apr 16, 2014 at 02:03:36PM +1000, NeilBrown wrote: > > xfs_file_*_read holds an inode lock while calling a generic 'read' > > function. These functions perform read-ahead and are quite likely to > > allocate memory. > > Yes,

Re: [PATCH 09/19] XFS: ensure xfs_file_*_read cannot deadlock in memory allocation.

2014-04-15 Thread NeilBrown
On Wed, 16 Apr 2014 16:04:59 +1000 Dave Chinner wrote: > On Wed, Apr 16, 2014 at 02:03:36PM +1000, NeilBrown wrote: > > xfs_file_*_read holds an inode lock while calling a generic 'read' > > function. These functions perform read-ahead and are quite likely to > > allocate memory. > > Yes, that'

Re: [PATCH 09/19] XFS: ensure xfs_file_*_read cannot deadlock in memory allocation.

2014-04-15 Thread Dave Chinner
On Wed, Apr 16, 2014 at 02:03:36PM +1000, NeilBrown wrote: > xfs_file_*_read holds an inode lock while calling a generic 'read' > function. These functions perform read-ahead and are quite likely to > allocate memory. Yes, that's what reading data from disk requires. > So set PF_FSTRANS to ensur

[PATCH 09/19] XFS: ensure xfs_file_*_read cannot deadlock in memory allocation.

2014-04-15 Thread NeilBrown
xfs_file_*_read holds an inode lock while calling a generic 'read' function. These functions perform read-ahead and are quite likely to allocate memory. So set PF_FSTRANS to ensure they avoid __GFP_FS and so don't recurse into a filesystem to free memory. This can be a problem with loop-back NFS