xfs: fix iclog allocation size
PATCH 1/1 xfs: fix iclog allocation size
Properly allocate the space for the bio_vecs instead of just one byte per bio_vec.
--- fs/xfs/xfs_log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/xfs/xfs_log.c +2 -1
@@ -1415,7 +1415,8 @@ xlog_alloc_log(*/ ASSERT (log->l_iclog_size >=4096 );for (i =0 ; i < log->l_iclog_bufs; i++) { -size_t bvec_size =howmany (log->l_iclog_size,PAGE_SIZE ); +size_t bvec_size =howmany (log->l_iclog_size,PAGE_SIZE ) * +sizeof (struct bio_vec ); iclog =kmem_zalloc (sizeof (*iclog) + bvec_size,KM_MAYFAIL );if (!iclog)
Signature · 1 line
2.20.1
Quoted 6 lines · Christoph Hellwig
Properly allocate the space for the
bio_vecsinstead of just one byte perbio_vec.Fixes 991fc1d2e65e ("xfs: use bios directly to write log buffers")Reported-by [email protected]Signed-off-by Christoph Hellwig <[email protected]>
Doh....
--D
Quoted 21 lines
--- fs/xfs/xfs_log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/xfs/xfs_log.c +2
-1@@ -1415,7 +1415,8 @@ xlog_alloc_log(*/ ASSERT (log->l_iclog_size >=4096 );for (i =0 ; i < log->l_iclog_bufs; i++) { -size_t bvec_size =howmany (log->l_iclog_size,PAGE_SIZE ); +size_t bvec_size =howmany (log->l_iclog_size,PAGE_SIZE ) * +sizeof (struct bio_vec ); iclog =kmem_zalloc (sizeof (*iclog) + bvec_size,KM_MAYFAIL );if (!iclog)Signature · 1 line
2.20.1
Quoted 4 lines · Christoph Hellwig
Properly allocate the space for the
bio_vecsinstead of just one byte perbio_vec.Fixes 991fc1d2e65e ("xfs: use bios directly to write log buffers")
I cannot find 991fc1d2e65e on Linus' tree, nor can I find the subject name patch on Linus' tree. I'm probably missing some context here?
Quoted 23 lines
Reported-by [email protected]Signed-off-by Christoph Hellwig <[email protected]>--- fs/xfs/xfs_log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/xfs/xfs_log.c +2
-1@@ -1415,7 +1415,8 @@ xlog_alloc_log(*/ ASSERT (log->l_iclog_size >=4096 );for (i =0 ; i < log->l_iclog_bufs; i++) { -size_t bvec_size =howmany (log->l_iclog_size,PAGE_SIZE ); +size_t bvec_size =howmany (log->l_iclog_size,PAGE_SIZE ) * +sizeof (struct bio_vec ); iclog =kmem_zalloc (sizeof (*iclog) + bvec_size,KM_MAYFAIL );if (!iclog)Signature · 1 line
2.20.1
Quoted 8 lines · Luis Chamberlain
Quoted 4 lines · Christoph Hellwig
Properly allocate the space for the
bio_vecsinstead of just one byte perbio_vec.Fixes 991fc1d2e65e ("xfs: use bios directly to write log buffers")I cannot find
991fc1d2e65eon Linus' tree, nor can I find the subject name patch on Linus' tree. I'm probably missing some context here?
This patch fixes a bug in for-next. :)
--D
Quoted 23 lines
Quoted 23 lines
Reported-by [email protected]Signed-off-by Christoph Hellwig <[email protected]>--- fs/xfs/xfs_log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)fs/xfs/xfs_log.c +2
-1@@ -1415,7 +1415,8 @@ xlog_alloc_log(*/ ASSERT (log->l_iclog_size >=4096 );for (i =0 ; i < log->l_iclog_bufs; i++) { -size_t bvec_size =howmany (log->l_iclog_size,PAGE_SIZE ); +size_t bvec_size =howmany (log->l_iclog_size,PAGE_SIZE ) * +sizeof (struct bio_vec ); iclog =kmem_zalloc (sizeof (*iclog) + bvec_size,KM_MAYFAIL );if (!iclog)Signature · 1 line
2.20.1
Quoted 11 lines · Darrick J. Wong
Quoted 8 lines · Luis Chamberlain
Quoted 4 lines · Christoph Hellwig
Properly allocate the space for the
bio_vecsinstead of just one byte perbio_vec.Fixes 991fc1d2e65e ("xfs: use bios directly to write log buffers")I cannot find
991fc1d2e65eon Linus' tree, nor can I find the subject name patch on Linus' tree. I'm probably missing some context here?This patch fixes a bug in for-next. :)
I figured as much but the commit in question is not even on linux-next for today, so I take it that line would be removed from the commit log?
Luis
Quoted 8 lines · Luis Chamberlain
Quoted 7 lines · Darrick J. Wong
Quoted 6 lines · Luis Chamberlain
Quoted 4 lines · Christoph Hellwig
Properly allocate the space for the
bio_vecsinstead of just one byte perbio_vec.Fixes 991fc1d2e65e ("xfs: use bios directly to write log buffers")
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I cannot find
991fc1d2e65eon Linus' tree, nor can I find the subject name patch on Linus' tree. I'm probably missing some context here?This patch fixes a bug in for-next. :)
I figured as much but the commit in question is not even on linux-next for today, so I take it that line would be removed from the commit log?
It looks like it is to me...
--D
Quoted 1 line
Luis
Quoted 12 lines · Darrick J. Wong
Quoted 11 lines · Luis Chamberlain
Quoted 10 lines · Darrick J. Wong
Quoted 8 lines · Luis Chamberlain
Quoted 4 lines · Christoph Hellwig
Properly allocate the space for the
bio_vecsinstead of just one byte perbio_vec.Fixes 991fc1d2e65e ("xfs: use bios directly to write log buffers")I cannot find
991fc1d2e65eon Linus' tree, nor can I find the subject name patch on Linus' tree. I'm probably missing some context here?
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
This patch fixes a bug in for-next. :)
I figured as much but the commit in question is not even on linux-next for today, so I take it that line would be removed from the commit log?
It looks like it is to me...
Yes but commits on linux-next make no sense for Linus' tree, as they change day to day, is my point. So if merged eventually as-is on Linus' tree, someone looking at the git history would not find 991fc1d2e65e, and could also throw errors on scripts which scrape for these tags. Yes, they exist, and distros do use them to evaluate possible fixes.
In this case I think just referring to the subject would do it.
Unless it just so happens to be that what is on for-next *does* always maintain the same commit IDs one it goes to Linus' tree? Does that actually happen?
Luis