Error: resize ext2 partition using parted command

HI

I my system i have a free space
GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.
(parted) print free
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
32.3kB 1049kB 1016kB Free Space
1 1049kB 525MB 524MB primary ext4 boot
2 525MB 13.1GB 12.6GB primary ext4
3 13.1GB 15.2GB 2097MB primary linux-swap(v1)
4 15.2GB 21.5GB 6263MB extended
5 15.2GB 16.2GB 994MB logical ext2
16.2GB 21.5GB 5268MB Free Space
21.5GB 21.5GB 6856kB Free Space

By using the parted command i am going to resize the 5th partition from 16.2GB to 17.9GB. But when i issuing the command i am receiving the below error.

(parted) resize
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted’s file system manipulation code is not as robust as what you’ll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Partition number? 5
Start? [15.2GB]? 15.2GB
End? [16.2GB]? 18GB
error: block relocator should have relocated 524
(parted) resize
WARNING: you are attempting to use parted to operate on (resize) a file system.
parted’s file system manipulation code is not as robust as what you’ll find in
dedicated, file-system-specific packages like e2fsprogs. We recommend
you use parted only to manipulate partition tables, whenever possible.
Support for performing most operations on most types of file systems
will be removed in an upcoming release.
Partition number? 5
Start? [15.2GB]? 15.2GB
End? [16.2GB]? 17.9GB
error: block relocator should have relocated 524

But when i am extending the size from 16.2GB to 17 GB. It is working fine but dont no why it is not
taking the 17.9 Gb

Please help me out on this

Use this for successful resizing of ext4 partition

# resize2fs /dev/sda6 NEWSIZE