|
@@ -143,32 +143,21 @@ static struct gfs2_bufdata *gfs2_alloc_bufdata(struct gfs2_glock *gl,
|
|
* @gl: The inode glock associated with the buffer
|
|
* @gl: The inode glock associated with the buffer
|
|
* @bh: The buffer to add
|
|
* @bh: The buffer to add
|
|
*
|
|
*
|
|
- * This is used in two distinct cases:
|
|
|
|
- * i) In ordered write mode
|
|
|
|
- * We put the data buffer on a list so that we can ensure that it's
|
|
|
|
- * synced to disk at the right time
|
|
|
|
- * ii) In journaled data mode
|
|
|
|
- * We need to journal the data block in the same way as metadata in
|
|
|
|
- * the functions above. The difference is that here we have a tag
|
|
|
|
- * which is two __be64's being the block number (as per meta data)
|
|
|
|
- * and a flag which says whether the data block needs escaping or
|
|
|
|
- * not. This means we need a new log entry for each 251 or so data
|
|
|
|
- * blocks, which isn't an enormous overhead but twice as much as
|
|
|
|
- * for normal metadata blocks.
|
|
|
|
|
|
+ * This is used in journaled data mode.
|
|
|
|
+ * We need to journal the data block in the same way as metadata in
|
|
|
|
+ * the functions above. The difference is that here we have a tag
|
|
|
|
+ * which is two __be64's being the block number (as per meta data)
|
|
|
|
+ * and a flag which says whether the data block needs escaping or
|
|
|
|
+ * not. This means we need a new log entry for each 251 or so data
|
|
|
|
+ * blocks, which isn't an enormous overhead but twice as much as
|
|
|
|
+ * for normal metadata blocks.
|
|
*/
|
|
*/
|
|
void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh)
|
|
void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh)
|
|
{
|
|
{
|
|
struct gfs2_trans *tr = current->journal_info;
|
|
struct gfs2_trans *tr = current->journal_info;
|
|
struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
|
|
struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
|
|
- struct address_space *mapping = bh->b_page->mapping;
|
|
|
|
- struct gfs2_inode *ip = GFS2_I(mapping->host);
|
|
|
|
struct gfs2_bufdata *bd;
|
|
struct gfs2_bufdata *bd;
|
|
|
|
|
|
- if (!gfs2_is_jdata(ip)) {
|
|
|
|
- gfs2_ordered_add_inode(ip);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
lock_buffer(bh);
|
|
lock_buffer(bh);
|
|
if (buffer_pinned(bh)) {
|
|
if (buffer_pinned(bh)) {
|
|
set_bit(TR_TOUCHED, &tr->tr_flags);
|
|
set_bit(TR_TOUCHED, &tr->tr_flags);
|