Commit 1d5a30dc authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] (11/15) big struct block_device * push (first series)

 - (JFS) removes ->dev from struct jfs_log - it's duplicated by
   ->bdev.  Old users of ->dev updated.
parent 87849dd5
...@@ -1073,7 +1073,6 @@ int lmLogOpen(struct super_block *sb, log_t ** logptr) ...@@ -1073,7 +1073,6 @@ int lmLogOpen(struct super_block *sb, log_t ** logptr)
log->sb = sb; /* This should be a list */ log->sb = sb; /* This should be a list */
log->flag = JFS_INLINELOG; log->flag = JFS_INLINELOG;
log->dev = sb->s_dev;
log->base = addressPXD(&JFS_SBI(sb)->logpxd); log->base = addressPXD(&JFS_SBI(sb)->logpxd);
log->size = lengthPXD(&JFS_SBI(sb)->logpxd) >> log->size = lengthPXD(&JFS_SBI(sb)->logpxd) >>
(L2LOGPSIZE - sb->s_blocksize_bits); (L2LOGPSIZE - sb->s_blocksize_bits);
...@@ -1104,7 +1103,6 @@ int lmLogOpen(struct super_block *sb, log_t ** logptr) ...@@ -1104,7 +1103,6 @@ int lmLogOpen(struct super_block *sb, log_t ** logptr)
} }
log->sb = sb; /* This should be a list */ log->sb = sb; /* This should be a list */
log->dev = JFS_SBI(sb)->logdev;
log->bdev = bdev; log->bdev = bdev;
/* /*
...@@ -1313,7 +1311,7 @@ static int lmLogInit(log_t * log) ...@@ -1313,7 +1311,7 @@ static int lmLogInit(log_t * log)
logsuper->state = cpu_to_le32(LOGMOUNT); logsuper->state = cpu_to_le32(LOGMOUNT);
log->serial = le32_to_cpu(logsuper->serial) + 1; log->serial = le32_to_cpu(logsuper->serial) + 1;
logsuper->serial = cpu_to_le32(log->serial); logsuper->serial = cpu_to_le32(log->serial);
logsuper->device = cpu_to_le32(kdev_t_to_nr(log->dev)); logsuper->device = cpu_to_le32(log->bdev->bd_dev);
lbmDirectWrite(log, bpsuper, lbmWRITE | lbmRELEASE | lbmSYNC); lbmDirectWrite(log, bpsuper, lbmWRITE | lbmRELEASE | lbmSYNC);
if ((rc = lbmIOWait(bpsuper, lbmFREE))) if ((rc = lbmIOWait(bpsuper, lbmFREE)))
goto errout30; goto errout30;
...@@ -1775,7 +1773,7 @@ static int lbmRead(log_t * log, int pn, lbuf_t ** bpp) ...@@ -1775,7 +1773,7 @@ static int lbmRead(log_t * log, int pn, lbuf_t ** bpp)
bio = bio_alloc(GFP_NOFS, 1); bio = bio_alloc(GFP_NOFS, 1);
bio->bi_sector = bp->l_blkno << (log->l2bsize - 9); bio->bi_sector = bp->l_blkno << (log->l2bsize - 9);
bio->bi_dev = log->dev; bio->bi_dev = to_kdev_t(log->bdev->bd_dev);
bio->bi_io_vec[0].bv_page = virt_to_page(bp->l_ldata); bio->bi_io_vec[0].bv_page = virt_to_page(bp->l_ldata);
bio->bi_io_vec[0].bv_len = LOGPSIZE; bio->bi_io_vec[0].bv_len = LOGPSIZE;
bio->bi_io_vec[0].bv_offset = 0; bio->bi_io_vec[0].bv_offset = 0;
...@@ -1917,7 +1915,7 @@ void lbmStartIO(lbuf_t * bp) ...@@ -1917,7 +1915,7 @@ void lbmStartIO(lbuf_t * bp)
bio = bio_alloc(GFP_NOFS, 1); bio = bio_alloc(GFP_NOFS, 1);
bio->bi_sector = bp->l_blkno << (log->l2bsize - 9); bio->bi_sector = bp->l_blkno << (log->l2bsize - 9);
bio->bi_dev = log->dev; bio->bi_dev = to_kdev_t(log->bdev->bd_dev);
bio->bi_io_vec[0].bv_page = virt_to_page(bp->l_ldata); bio->bi_io_vec[0].bv_page = virt_to_page(bp->l_ldata);
bio->bi_io_vec[0].bv_len = LOGPSIZE; bio->bi_io_vec[0].bv_len = LOGPSIZE;
bio->bi_io_vec[0].bv_offset = 0; bio->bi_io_vec[0].bv_offset = 0;
......
...@@ -366,7 +366,6 @@ typedef struct jfs_log { ...@@ -366,7 +366,6 @@ typedef struct jfs_log {
* need to be a list if we share * need to be a list if we share
* the log between fs's * the log between fs's
*/ */
kdev_t dev; /* 4: log lv number */
struct block_device *bdev; /* 4: log lv pointer */ struct block_device *bdev; /* 4: log lv pointer */
s32 serial; /* 4: log mount serial number */ s32 serial; /* 4: log mount serial number */
......
...@@ -444,7 +444,7 @@ int updateSuper(struct super_block *sb, uint state) ...@@ -444,7 +444,7 @@ int updateSuper(struct super_block *sb, uint state)
if (state == FM_MOUNT) { if (state == FM_MOUNT) {
/* record log's dev_t and mount serial number */ /* record log's dev_t and mount serial number */
j_sb->s_logdev = j_sb->s_logdev =
cpu_to_le32(kdev_t_to_nr(JFS_SBI(sb)->log->dev)); cpu_to_le32(JFS_SBI(sb)->log->bdev->bd_dev);
j_sb->s_logserial = cpu_to_le32(JFS_SBI(sb)->log->serial); j_sb->s_logserial = cpu_to_le32(JFS_SBI(sb)->log->serial);
/* record our own device number in case the location /* record our own device number in case the location
* changes after a reboot * changes after a reboot
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment